authorizer/server/graph/schema.graphqls

119 lines
2.0 KiB
GraphQL
Raw Normal View History

# GraphQL schema example
#
# https://gqlgen.com/getting-started/
2021-07-12 18:22:16 +00:00
scalar Int64
type Meta {
2021-08-06 13:47:52 +00:00
version: String!
isGoogleLoginEnabled: Boolean!
isFacebookLoginEnabled: Boolean!
isTwitterLoginEnabled: Boolean!
isGithubLoginEnabled: Boolean!
isEmailVerificationEnabled: Boolean!
isBasicAuthenticationEnabled: Boolean!
}
2021-07-12 18:22:16 +00:00
type User {
2021-08-06 13:47:52 +00:00
id: ID!
email: String!
signupMethod: String!
firstName: String
lastName: String
emailVerifiedAt: Int64
image: String
createdAt: Int64
updatedAt: Int64
}
2021-07-12 18:22:16 +00:00
type VerificationRequest {
2021-08-06 13:47:52 +00:00
id: ID!
identifier: String
token: String
email: String
expires: Int64
createdAt: Int64
updatedAt: Int64
2021-07-12 18:22:16 +00:00
}
type Error {
2021-08-06 13:47:52 +00:00
message: String!
reason: String!
2021-07-12 18:22:16 +00:00
}
type AuthResponse {
2021-08-06 13:47:52 +00:00
message: String!
accessToken: String
accessTokenExpiresAt: Int64
user: User
2021-07-12 18:22:16 +00:00
}
2021-07-15 09:43:00 +00:00
type Response {
2021-08-06 13:47:52 +00:00
message: String!
2021-07-15 09:43:00 +00:00
}
input SignUpInput {
2021-08-06 13:47:52 +00:00
firstName: String
lastName: String
email: String!
password: String!
confirmPassword: String!
image: String
2021-07-12 18:22:16 +00:00
}
input LoginInput {
2021-08-06 13:47:52 +00:00
email: String!
password: String!
}
input VerifyEmailInput {
2021-08-06 13:47:52 +00:00
token: String!
}
input ResendVerifyEmailInput {
2021-08-06 13:47:52 +00:00
email: String!
}
input UpdateProfileInput {
2021-08-06 13:47:52 +00:00
oldPassword: String
newPassword: String
confirmNewPassword: String
firstName: String
lastName: String
image: String
email: String
}
input ForgotPasswordInput {
2021-08-06 13:47:52 +00:00
email: String!
}
2021-08-07 08:41:26 +00:00
input ResetPasswordInput {
2021-08-06 13:47:52 +00:00
token: String!
password: String!
confirmPassword: String!
}
input DeleteUserInput {
email: String!
}
type Mutation {
2021-08-06 13:47:52 +00:00
signup(params: SignUpInput!): AuthResponse!
login(params: LoginInput!): AuthResponse!
logout: Response!
updateProfile(params: UpdateProfileInput!): Response!
verifyEmail(params: VerifyEmailInput!): AuthResponse!
resendVerifyEmail(params: ResendVerifyEmailInput!): Response!
forgotPassword(params: ForgotPasswordInput!): Response!
2021-08-07 08:41:26 +00:00
resetPassword(params: ResetPasswordInput!): Response!
2021-08-06 13:47:52 +00:00
deleteUser(params: DeleteUserInput!): Response!
}
type Query {
2021-08-06 13:47:52 +00:00
meta: Meta!
users: [User!]!
token: AuthResponse
profile: User!
verificationRequests: [VerificationRequest!]!
2021-07-12 18:22:16 +00:00
}