2021-07-08 12:15:19 +00:00
|
|
|
# GraphQL schema example
|
|
|
|
#
|
|
|
|
# https://gqlgen.com/getting-started/
|
2021-07-12 18:22:16 +00:00
|
|
|
scalar Int64
|
2021-07-08 12:15:19 +00:00
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
type User {
|
2021-07-08 12:15:19 +00:00
|
|
|
id: ID!
|
2021-07-12 18:22:16 +00:00
|
|
|
email: String!
|
2021-07-17 16:29:50 +00:00
|
|
|
signupMethod: String!
|
2021-07-12 18:22:16 +00:00
|
|
|
firstName: String
|
|
|
|
lastName: String
|
|
|
|
emailVerifiedAt: Int64
|
|
|
|
password: String
|
|
|
|
image: String
|
|
|
|
createdAt: Int64
|
|
|
|
updatedAt: Int64
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
2021-07-12 18:22:16 +00:00
|
|
|
type VerificationRequest {
|
2021-07-08 12:15:19 +00:00
|
|
|
id: ID!
|
2021-07-12 18:22:16 +00:00
|
|
|
identifier: String
|
|
|
|
token: String
|
|
|
|
email: String
|
|
|
|
expires: Int64
|
|
|
|
createdAt: Int64
|
|
|
|
updatedAt: Int64
|
|
|
|
}
|
|
|
|
|
|
|
|
type Error {
|
|
|
|
message: String!
|
|
|
|
reason: String!
|
|
|
|
}
|
|
|
|
|
2021-07-14 18:43:19 +00:00
|
|
|
type LoginResponse {
|
2021-07-12 18:22:16 +00:00
|
|
|
message: String!
|
2021-07-14 18:43:19 +00:00
|
|
|
accessToken: String
|
2021-07-15 12:02:55 +00:00
|
|
|
accessTokenExpiresAt: Int64
|
2021-07-12 18:22:16 +00:00
|
|
|
user: User
|
|
|
|
}
|
|
|
|
|
2021-07-15 09:43:00 +00:00
|
|
|
type Response {
|
|
|
|
message: String!
|
|
|
|
}
|
|
|
|
|
|
|
|
input SignUpInput {
|
2021-07-12 18:22:16 +00:00
|
|
|
firstName: String
|
|
|
|
lastName: String
|
|
|
|
email: String!
|
|
|
|
password: String!
|
|
|
|
cofirmPassword: String!
|
|
|
|
image: String
|
|
|
|
}
|
|
|
|
|
2021-07-14 18:43:19 +00:00
|
|
|
input LoginInput {
|
2021-07-12 18:22:16 +00:00
|
|
|
email: String!
|
|
|
|
password: String!
|
2021-07-08 12:15:19 +00:00
|
|
|
}
|
|
|
|
|
2021-07-18 03:55:20 +00:00
|
|
|
input VerifyEmailInput {
|
2021-07-13 20:06:11 +00:00
|
|
|
token: String!
|
|
|
|
}
|
|
|
|
|
2021-07-18 07:26:17 +00:00
|
|
|
input ResendVerifyEmailInput {
|
|
|
|
email: String!
|
|
|
|
}
|
|
|
|
|
2021-07-18 03:55:20 +00:00
|
|
|
input UpdateProfileInput {
|
|
|
|
oldPassword: String
|
|
|
|
newPassword: String
|
|
|
|
confirmNewPassword: String
|
|
|
|
firstName: String
|
|
|
|
lastName: String
|
|
|
|
image: String
|
|
|
|
email: String
|
|
|
|
}
|
|
|
|
|
2021-07-18 09:56:29 +00:00
|
|
|
input ForgotPasswordRequestInput {
|
|
|
|
email: String!
|
|
|
|
}
|
|
|
|
|
|
|
|
input ForgotPasswordInput {
|
|
|
|
token: String!
|
|
|
|
newPassword: String!
|
|
|
|
confirmPassword: String!
|
|
|
|
}
|
|
|
|
|
2021-07-08 12:15:19 +00:00
|
|
|
type Mutation {
|
2021-07-18 03:55:20 +00:00
|
|
|
signup(params: SignUpInput!): Response!
|
2021-07-14 18:43:19 +00:00
|
|
|
login(params: LoginInput!): LoginResponse!
|
2021-07-15 09:43:00 +00:00
|
|
|
logout: Response!
|
2021-07-18 03:55:20 +00:00
|
|
|
updateProfile(params: UpdateProfileInput!): Response!
|
|
|
|
verifyEmail(params: VerifyEmailInput!): LoginResponse!
|
2021-07-18 07:26:17 +00:00
|
|
|
resendVerifyEmail(params: ResendVerifyEmailInput!): Response!
|
2021-07-18 09:56:29 +00:00
|
|
|
forgotPasswordRequest(params: ForgotPasswordRequestInput!): Response!
|
|
|
|
forgotPassword(params: ForgotPasswordInput!): Response!
|
2021-07-14 18:43:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Query {
|
|
|
|
users: [User!]!
|
2021-07-15 09:43:00 +00:00
|
|
|
token: LoginResponse
|
2021-07-17 23:26:34 +00:00
|
|
|
profile: User!
|
2021-07-18 04:22:54 +00:00
|
|
|
verificationRequests: [VerificationRequest!]!
|
2021-07-12 18:22:16 +00:00
|
|
|
}
|