-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.gql
96 lines (84 loc) · 1.91 KB
/
schema.gql
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# -----------------------------------------------
# !!! THIS FILE WAS GENERATED BY TYPE-GRAPHQL !!!
# !!! DO NOT MODIFY THIS FILE BY YOURSELF !!!
# -----------------------------------------------
input CreateRoleInput {
name: String!
permissions: [PermissionInput!]!
}
input LoginInput {
email: String!
password: String!
}
type Mutation {
createRole(data: CreateRoleInput!): Role!
createUser(data: RegisterInput!): User!
deleteRoleByID(id: String!): Boolean!
deleteUserByID(id: String!): Boolean!
login(loginInput: LoginInput!): User
logout: Boolean!
register(registerInput: RegisterInput!): User
updateRoleByID(data: UpdateRoleInput!, id: String!): Role!
updateUserByID(data: UpdateUserDataInput!, id: String!): User!
updateUserRoleByID(id: String!, role: String!): User
}
"""Permission model"""
type Permission {
collectionName: String!
create: Boolean
delete: Boolean
id: ID!
read: Boolean
update: Boolean
}
"""Permission model"""
input PermissionInput {
collectionName: String!
create: Boolean = false
delete: Boolean = false
read: Boolean = false
update: Boolean = false
}
type Query {
countRole: Int!
countUser: Int!
getAllRoles(first: String!): Role!
getAllUsers(first: String!): User!
me: User
}
input RegisterInput {
confirmPassword: String!
email: String!
firstName: String!
lastName: String!
password: String!
}
"""Role model"""
type Role {
id: ID!
name: String!
permissions: [Permission!]!
}
"""
The javascript `Date` as integer. Type represents date and time as number of milliseconds from start of UNIX epoch.
"""
scalar Timestamp
input UpdateRoleInput {
name: String!
permissions: [PermissionInput!]!
}
input UpdateUserDataInput {
email: String
firstName: String
lastName: String
}
"""User model"""
type User {
createdAt: Timestamp!
email: String!
firstName: String!
id: ID!
lastName: String!
name: String!
role: Role!
}