schema.graphqls
755 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
## type
type Users{
name: String
phone: String
roles: [Role!]
status: Int
adminType: Int
createTime: String
updateTime: String
}
type Role{
id: Int
roleName: String
parentId: Int
createTime: String
updateTime: String
}
## user input
input createUsersInput{
name: String!
phone: String!
}
input updateUsersInput{
id: Int!
name: String
}
input removeUsersInput{
id: Int!
}
input getUsersInput{
id: Int!
}
input listUsersInput{
offset: Int!
limit: Int!
}
type Query {
user(input : getUsersInput!): Users!
users(input : listUsersInput!): [Users!]
}
type Mutation{
createUsers(input : createUsersInput!): Users!
removeUsers(input : removeUsersInput!): Users!
updateUsers(input : updateUsersInput!): Users!
}