1scalar Time
2scalar Label
3scalar Hash
4
5"""Information about pagination in a connection."""
6type PageInfo {
7 """When paginating forwards, are there more items?"""
8 hasNextPage: Boolean!
9 """When paginating backwards, are there more items?"""
10 hasPreviousPage: Boolean!
11 """When paginating backwards, the cursor to continue."""
12 startCursor: String!
13 """When paginating forwards, the cursor to continue."""
14 endCursor: String!
15}
16
17"""Represents an person in a git object."""
18type Person {
19 """The email of the person."""
20 email: String
21
22 """The name of the person."""
23 name: String!
24
25 """An url to an avatar"""
26 avatarUrl: String
27}
28
29type CommentConnection {
30 edges: [CommentEdge!]!
31 nodes: [Comment!]!
32 pageInfo: PageInfo!
33 totalCount: Int!
34}
35
36type CommentEdge {
37 cursor: String!
38 node: Comment!
39}
40
41"""Represents a comment on a bug."""
42type Comment implements Authored {
43 """The author of this comment."""
44 author: Person!
45
46 """The message of this comment."""
47 message: String!
48
49 """All media's hash referenced in this comment"""
50 files: [Hash!]!
51}
52
53enum Status {
54 OPEN
55 CLOSED
56}
57
58"""An object that has an author."""
59interface Authored {
60 """The author of this object."""
61 author: Person!
62}
63
64type OperationConnection {
65 edges: [OperationEdge!]!
66 nodes: [Operation!]!
67 pageInfo: PageInfo!
68 totalCount: Int!
69}
70
71type OperationEdge {
72 cursor: String!
73 node: Operation!
74}
75
76"""An item in the timeline of events"""
77interface TimelineItem {
78 hash: Hash!
79}
80
81"""An operation applied to a bug."""
82interface Operation {
83 """The operations author."""
84 author: Person!
85 """The datetime when this operation was issued."""
86 date: Time!
87}
88
89type CreateOperation implements Operation & Authored {
90 author: Person!
91 date: Time!
92
93 title: String!
94 message: String!
95 files: [Hash!]!
96}
97
98type SetTitleOperation implements Operation & Authored {
99 hash: Hash!
100 author: Person!
101 date: Time!
102
103 title: String!
104 was: String!
105}
106
107type AddCommentOperation implements Operation & Authored {
108 author: Person!
109 date: Time!
110
111 message: String!
112 files: [Hash!]!
113}
114
115type SetStatusOperation implements Operation & Authored {
116 hash: Hash!
117 author: Person!
118 date: Time!
119
120 status: Status!
121}
122
123type LabelChangeOperation implements Operation & Authored {
124 hash: Hash!
125 author: Person!
126 date: Time!
127
128 added: [Label!]!
129 removed: [Label!]!
130}
131
132type TimelineItemConnection {
133 edges: [TimelineItemEdge!]!
134 nodes: [TimelineItem!]!
135 pageInfo: PageInfo!
136 totalCount: Int!
137}
138
139type TimelineItemEdge {
140 cursor: String!
141 node: TimelineItem!
142}
143
144type CommentHistoryStep {
145 message: String!
146 date: Time!
147}
148
149type CreateTimelineItem implements TimelineItem {
150 hash: Hash!
151 author: Person!
152 message: String!
153 files: [Hash!]!
154 createdAt: Time!
155 lastEdit: Time!
156 edited: Boolean!
157 history: [CommentHistoryStep!]!
158}
159
160type AddCommentTimelineItem implements TimelineItem {
161 hash: Hash!
162 author: Person!
163 message: String!
164 files: [Hash!]!
165 createdAt: Time!
166 lastEdit: Time!
167 edited: Boolean!
168 history: [CommentHistoryStep!]!
169}
170
171type LabelChangeTimelineItem implements TimelineItem {
172 hash: Hash!
173 author: Person!
174 date: Time!
175 added: [Label!]!
176 removed: [Label!]!
177}
178
179type SetStatusTimelineItem implements TimelineItem {
180 hash: Hash!
181 author: Person!
182 date: Time!
183 status: Status!
184}
185
186type SetTitleTimelineItem implements TimelineItem {
187 hash: Hash!
188 author: Person!
189 date: Time!
190 title: String!
191 was: String!
192}
193
194"""The connection type for Bug."""
195type BugConnection {
196 """A list of edges."""
197 edges: [BugEdge!]!
198 nodes: [Bug!]!
199 """Information to aid in pagination."""
200 pageInfo: PageInfo!
201 """Identifies the total count of items in the connection."""
202 totalCount: Int!
203}
204
205"""An edge in a connection."""
206type BugEdge {
207 """A cursor for use in pagination."""
208 cursor: String!
209 """The item at the end of the edge."""
210 node: Bug!
211}
212
213type Bug {
214 id: String!
215 humanId: String!
216 status: Status!
217 title: String!
218 labels: [Label!]!
219 author: Person!
220 createdAt: Time!
221 lastEdit: Time!
222
223 comments(
224 """Returns the elements in the list that come after the specified cursor."""
225 after: String
226 """Returns the elements in the list that come before the specified cursor."""
227 before: String
228 """Returns the first _n_ elements from the list."""
229 first: Int
230 """Returns the last _n_ elements from the list."""
231 last: Int
232 ): CommentConnection!
233
234 timeline(
235 """Returns the elements in the list that come after the specified cursor."""
236 after: String
237 """Returns the elements in the list that come before the specified cursor."""
238 before: String
239 """Returns the first _n_ elements from the list."""
240 first: Int
241 """Returns the last _n_ elements from the list."""
242 last: Int
243 ): TimelineItemConnection!
244
245 operations(
246 """Returns the elements in the list that come after the specified cursor."""
247 after: String
248 """Returns the elements in the list that come before the specified cursor."""
249 before: String
250 """Returns the first _n_ elements from the list."""
251 first: Int
252 """Returns the last _n_ elements from the list."""
253 last: Int
254 ): OperationConnection!
255}
256
257type Repository {
258 allBugs(
259 """Returns the elements in the list that come after the specified cursor."""
260 after: String
261 """Returns the elements in the list that come before the specified cursor."""
262 before: String
263 """Returns the first _n_ elements from the list."""
264 first: Int
265 """Returns the last _n_ elements from the list."""
266 last: Int
267 """A query to select and order bugs"""
268 query: String
269 ): BugConnection!
270 bug(prefix: String!): Bug
271}
272
273type Query {
274 defaultRepository: Repository
275 repository(id: String!): Repository
276}
277
278type Mutation {
279 newBug(repoRef: String, title: String!, message: String!, files: [Hash!]): Bug!
280
281 addComment(repoRef: String, prefix: String!, message: String!, files: [Hash!]): Bug!
282 changeLabels(repoRef: String, prefix: String!, added: [String!], removed: [String!]): Bug!
283 open(repoRef: String, prefix: String!): Bug!
284 close(repoRef: String, prefix: String!): Bug!
285 setTitle(repoRef: String, prefix: String!, title: String!): Bug!
286
287 commit(repoRef: String, prefix: String!): Bug!
288}