authorizer/server/graph/schema.graphqls

104 lines
1.8 KiB
GraphQL
Raw Normal View History

# GraphQL schema example
#
# https://gqlgen.com/getting-started/
2021-07-12 18:22:16 +00:00
scalar Int64
2021-07-12 18:22:16 +00:00
type User {
id: ID!
2021-07-12 18:22:16 +00:00
email: String!
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-12 18:22:16 +00:00
type VerificationRequest {
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!
}
type LoginResponse {
2021-07-12 18:22:16 +00:00
message: String!
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!
confirmPassword: String!
2021-07-12 18:22:16 +00:00
image: String
}
input LoginInput {
2021-07-12 18:22:16 +00:00
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!
2021-07-15 09:43:00 +00:00
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!]!
2021-07-15 09:43:00 +00:00
token: LoginResponse
profile: User!
verificationRequests: [VerificationRequest!]!
2021-07-12 18:22:16 +00:00
}