-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschema.txt
195 lines (161 loc) · 3.7 KB
/
schema.txt
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
type Build implements Node {
id: ID!
project: Project!
number: Int!
user: User!
status: String!
commit: String!
output: String!
completedAt: DateTime
createdAt: DateTime!
}
type BuildPaginator {
paginatorInfo: PaginatorInfo!
data: [Build!]!
}
input CreateProjectInput {
teamId: ID!
name: String!
slug: String
repository: String!
privateKey: String!
}
scalar Date
scalar DateTime
type Mutation {
createTeam(team: TeamInput!): Team
updateTeam(id: ID!, team: TeamInput!): Team
deleteTeam(id: ID!): Team
createUser(user: UserInput!): User
updateUser(id: ID!, user: UserInput!): User
deleteUser(id: ID!): User
addTeamUser(teamId: ID!, userId: ID!): User!
removeTeamUser(teamId: ID!, userId: ID!): User!
addUserRole(id: ID!, role: String!, teamId: Int): User
removeUserRole(id: ID!, role: String!, teamId: Int): User
createProject(project: CreateProjectInput!): Project
updateProject(id: ID!, project: UpdateProjectInput!): Project
deleteProject(id: ID!): Project
buildProject(id: ID!, commit: String!): Boolean
}
"""Node global interface"""
interface Node {
"""
Global identifier that can be used to resolve any Node implementation.
"""
id: ID!
}
type PageInfo {
"""When paginating forwards, are there more items?"""
hasNextPage: Boolean!
"""When paginating backwards, are there more items?"""
hasPreviousPage: Boolean!
"""When paginating backwards, the cursor to continue."""
startCursor: String
"""When paginating forwards, the cursor to continue."""
endCursor: String
"""Total number of node in connection."""
total: Int
"""Count of nodes in current request."""
count: Int
"""Current page of request."""
currentPage: Int
"""Last page in connection."""
lastPage: Int
}
type PaginatorInfo {
"""Total count of available items in the page."""
count: Int!
"""Current pagination page."""
currentPage: Int!
"""Index of first item in the current page."""
firstItem: Int
"""If collection has more pages."""
hasMorePages: Boolean!
"""Index of last item in the current page."""
lastItem: Int
"""Last page number of the collection."""
lastPage: Int!
"""Number of items per page in the collection."""
perPage: Int!
"""Total items available in the collection."""
total: Int!
}
type Project {
id: ID!
team: Team!
name: String!
repository: String!
timeout: Int!
createdAt: DateTime!
updatedAt: DateTime
builds: [Build!]!
latestBuild: Build
}
type ProjectPaginator {
paginatorInfo: PaginatorInfo!
data: [Project!]!
}
type Query {
me: User
team(id: ID!): Team
teams(count: Int!, page: Int, sortBy: String, sortDesc: Boolean): TeamPaginator
user(id: ID!): User
users(count: Int!, page: Int): UserPaginator
project(id: ID!): Project
projects(count: Int!, page: Int): ProjectPaginator
builds(count: Int!, page: Int): BuildPaginator
build(id: ID!): Build
node(id: ID!): Node
}
type Team {
id: ID!
name: String!
slug: String!
createdAt: DateTime!
updatedAt: DateTime
userCount: Int!
users: [User!]
projectCount: Int!
projects: [Team!]
}
input TeamInput {
slug: String!
name: String!
}
type TeamPaginator {
paginatorInfo: PaginatorInfo!
data: [Team!]!
}
input UpdateProjectInput {
name: String!
slug: String
repository: String!
privateKey: String!
}
type User implements Node {
id: ID!
name: String!
email: String!
createdAt: DateTime!
updatedAt: DateTime
teams: [Team!]
userRoles: [UserRole!]
}
input UserInput {
name: String!
email: String!
password: String!
}
type UserPaginator {
paginatorInfo: PaginatorInfo!
data: [User!]!
}
type UserRole {
id: ID!
user: User!
role: String!
team: Team
createdAt: DateTime!
updatedAt: DateTime
}