78 lines
1.1 KiB
GraphQL
78 lines
1.1 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
|
|
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 {
|
|
verifySignupToken(params: VerifySignupTokenInput!): LoginResponse!
|
|
signup(params: SignUpInput!): SignUpResponse!
|
|
login(params: LoginInput!): LoginResponse!
|
|
logout: Response!
|
|
}
|
|
|
|
type Query {
|
|
users: [User!]!
|
|
token: LoginResponse
|
|
}
|