Files
authorizer/server/graph/schema.graphqls

80 lines
1.2 KiB
GraphQL
Raw Normal View History

# GraphQL schema example
#
# https://gqlgen.com/getting-started/
2021-07-12 23:52:16 +05:30
scalar Int64
2021-07-12 23:52:16 +05:30
type User {
id: ID!
2021-07-12 23:52:16 +05:30
email: String!
signupMethod: String!
2021-07-12 23:52:16 +05:30
firstName: String
lastName: String
emailVerifiedAt: Int64
password: String
image: String
createdAt: Int64
updatedAt: Int64
}
2021-07-12 23:52:16 +05:30
type VerificationRequest {
id: ID!
2021-07-12 23:52:16 +05:30
identifier: String
token: String
email: String
expires: Int64
createdAt: Int64
updatedAt: Int64
}
type Error {
message: String!
reason: String!
}
type LoginResponse {
2021-07-12 23:52:16 +05:30
message: String!
accessToken: String
2021-07-15 17:32:55 +05:30
accessTokenExpiresAt: Int64
2021-07-12 23:52:16 +05:30
user: User
}
2021-07-15 15:13:00 +05:30
type SignUpResponse {
2021-07-12 23:52:16 +05:30
message: String!
user: User
}
2021-07-15 15:13:00 +05:30
type Response {
message: String!
}
input SignUpInput {
2021-07-12 23:52:16 +05:30
firstName: String
lastName: String
email: String!
password: String!
cofirmPassword: String!
image: String
}
input LoginInput {
2021-07-12 23:52:16 +05:30
email: String!
password: String!
}
input VerifySignupTokenInput {
token: String!
}
type Mutation {
2021-07-15 15:13:00 +05:30
signup(params: SignUpInput!): SignUpResponse!
verifySignupToken(params: VerifySignupTokenInput!): LoginResponse!
login(params: LoginInput!): LoginResponse!
2021-07-15 15:13:00 +05:30
logout: Response!
}
type Query {
users: [User!]!
2021-07-15 15:13:00 +05:30
token: LoginResponse
profile: User!
2021-07-12 23:52:16 +05:30
}