authorizer/server/graph/schema.graphqls
Lakhan Samani 9b8658f666 add google login
- refactor resolvers
- fix signup method typos

Resolves #17
2021-07-17 21:59:50 +05:30

79 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
}