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 & TimelineItem {
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 & TimelineItem {
116 hash: Hash!
117 author: Person!
118 date: Time!
119
120 status: Status!
121}
122
123type LabelChangeOperation implements Operation & Authored & TimelineItem {
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 CreateTimelineItem implements TimelineItem {
145 hash: Hash!
146 lastState: Comment!
147 history: [Comment!]!
148}
149
150type CommentTimelineItem implements TimelineItem {
151 hash: Hash!
152 lastState: Comment!
153 history: [Comment!]!
154}
155
156"""The connection type for Bug."""
157type BugConnection {
158 """A list of edges."""
159 edges: [BugEdge!]!
160 nodes: [Bug!]!
161 """Information to aid in pagination."""
162 pageInfo: PageInfo!
163 """Identifies the total count of items in the connection."""
164 totalCount: Int!
165}
166
167"""An edge in a connection."""
168type BugEdge {
169 """A cursor for use in pagination."""
170 cursor: String!
171 """The item at the end of the edge."""
172 node: Bug!
173}
174
175type Bug {
176 id: String!
177 humanId: String!
178 status: Status!
179 title: String!
180 labels: [Label!]!
181 author: Person!
182 createdAt: Time!
183 lastEdit: Time!
184
185 comments(
186 """Returns the elements in the list that come after the specified cursor."""
187 after: String
188 """Returns the elements in the list that come before the specified cursor."""
189 before: String
190 """Returns the first _n_ elements from the list."""
191 first: Int
192 """Returns the last _n_ elements from the list."""
193 last: Int
194 ): CommentConnection!
195
196 timeline(
197 """Returns the elements in the list that come after the specified cursor."""
198 after: String
199 """Returns the elements in the list that come before the specified cursor."""
200 before: String
201 """Returns the first _n_ elements from the list."""
202 first: Int
203 """Returns the last _n_ elements from the list."""
204 last: Int
205 ): TimelineItemConnection!
206
207 operations(
208 """Returns the elements in the list that come after the specified cursor."""
209 after: String
210 """Returns the elements in the list that come before the specified cursor."""
211 before: String
212 """Returns the first _n_ elements from the list."""
213 first: Int
214 """Returns the last _n_ elements from the list."""
215 last: Int
216 ): OperationConnection!
217}
218
219type Repository {
220 allBugs(
221 """Returns the elements in the list that come after the specified cursor."""
222 after: String
223 """Returns the elements in the list that come before the specified cursor."""
224 before: String
225 """Returns the first _n_ elements from the list."""
226 first: Int
227 """Returns the last _n_ elements from the list."""
228 last: Int
229 """A query to select and order bugs"""
230 query: String
231 ): BugConnection!
232 bug(prefix: String!): Bug
233}
234
235type Query {
236 defaultRepository: Repository
237 repository(id: String!): Repository
238}
239
240type Mutation {
241 newBug(repoRef: String, title: String!, message: String!, files: [Hash!]): Bug!
242
243 addComment(repoRef: String, prefix: String!, message: String!, files: [Hash!]): Bug!
244 changeLabels(repoRef: String, prefix: String!, added: [String!], removed: [String!]): Bug!
245 open(repoRef: String, prefix: String!): Bug!
246 close(repoRef: String, prefix: String!): Bug!
247 setTitle(repoRef: String, prefix: String!, title: String!): Bug!
248
249 commit(repoRef: String, prefix: String!): Bug!
250}