authorizer/server/graph/schema.graphqls
2021-07-18 04:56:34 +05:30

80 lines
1.2 KiB
GraphQL

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