45 lines
692 B
GraphQL
45 lines
692 B
GraphQL
input UserLoginInput {
|
|
email: String!
|
|
password: String!
|
|
}
|
|
|
|
type User {
|
|
id: ID!
|
|
firstName: String!
|
|
lastName: String!
|
|
email: String!
|
|
dateOfBirth: String!
|
|
}
|
|
|
|
type UserLoginResponse {
|
|
success: Boolean!
|
|
token: String
|
|
user: User
|
|
error: String
|
|
}
|
|
|
|
input CreateUserInput {
|
|
firstName: String!
|
|
lastName: String!
|
|
email: String!
|
|
password: String!
|
|
dateOfBirth: String!
|
|
}
|
|
|
|
type CreateUserResponse {
|
|
success: Boolean!
|
|
token: String
|
|
user: User
|
|
error: String
|
|
}
|
|
|
|
type UserLogoutResponse {
|
|
success: Boolean!
|
|
}
|
|
|
|
type Mutation {
|
|
login(input: UserLoginInput!): UserLoginResponse!
|
|
logout: UserLogoutResponse!
|
|
createUser(input: CreateUserInput!): CreateUserResponse!
|
|
}
|