24 lines
351 B
GraphQL
24 lines
351 B
GraphQL
type User{
|
|
id: ID!
|
|
name: String!
|
|
phone: String
|
|
age: Int
|
|
}
|
|
|
|
input CreateUserInput{
|
|
password: String!
|
|
name: String!
|
|
phone: String
|
|
age: Int
|
|
}
|
|
|
|
|
|
type Query{
|
|
user(id: ID!): User!
|
|
login(id: ID!,password: String!): String!
|
|
logout(id: ID!): Boolean!
|
|
}
|
|
|
|
type Mutation{
|
|
register(create: CraeteUserInput): User!
|
|
} |