authorizer/server/graph/schema.graphqls
Lakhan Samani 367d02f86e Add forgot password resolver
Resolves #10
2021-07-18 15:26:29 +05:30

104 lines
1.8 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 Response {
message: String!
}
input SignUpInput {
firstName: String
lastName: String
email: String!
password: String!
cofirmPassword: String!
image: String
}
input LoginInput {
email: String!
password: String!
}
input VerifyEmailInput {
token: String!
}
input ResendVerifyEmailInput {
email: String!
}
input UpdateProfileInput {
oldPassword: String
newPassword: String
confirmNewPassword: String
firstName: String
lastName: String
image: String
email: String
}
input ForgotPasswordRequestInput {
email: String!
}
input ForgotPasswordInput {
token: String!
newPassword: String!
confirmPassword: String!
}
type Mutation {
signup(params: SignUpInput!): Response!
login(params: LoginInput!): LoginResponse!
logout: Response!
updateProfile(params: UpdateProfileInput!): Response!
verifyEmail(params: VerifyEmailInput!): LoginResponse!
resendVerifyEmail(params: ResendVerifyEmailInput!): Response!
forgotPasswordRequest(params: ForgotPasswordRequestInput!): Response!
forgotPassword(params: ForgotPasswordInput!): Response!
}
type Query {
users: [User!]!
token: LoginResponse
profile: User!
verificationRequests: [VerificationRequest!]!
}