1scalar Time
2scalar Label
3
4# Information about pagination in a connection.
5type PageInfo {
6 # When paginating forwards, are there more items?
7 hasNextPage: Boolean!
8
9 # When paginating backwards, are there more items?
10 hasPreviousPage: Boolean!
11
12 # When paginating backwards, the cursor to continue.
13# startCursor: String
14
15 # When paginating forwards, the cursor to continue.
16# endCursor: String
17}
18
19input ConnectionInput {
20 # Returns the elements in the list that come after the specified cursor.
21 after: String
22
23 # Returns the elements in the list that come before the specified cursor.
24 before: String
25
26 # Returns the first _n_ elements from the list.
27 first: Int
28
29 # Returns the last _n_ elements from the list.
30 last: Int
31}
32
33# Represents an person in a git object.
34type Person {
35 # The email of the person.
36 email: String
37
38 # The name of the person.
39 name: String
40}
41
42
43type CommentConnection {
44 edges: [CommentEdge!]!
45 pageInfo: PageInfo!
46 totalCount: Int!
47}
48
49type CommentEdge {
50 cursor: String!
51 node: Comment!
52}
53
54# Represents a comment on a bug.
55type Comment implements Authored {
56 # The author of this comment.
57 author: Person!
58
59 # The message of this comment.
60 message: String!
61}
62
63enum Status {
64 OPEN
65 CLOSED
66}
67
68# An object that has an author.
69interface Authored {
70 # The author of this object.
71 author: Person!
72}
73
74type OperationConnection {
75 edges: [OperationEdge!]!
76 pageInfo: PageInfo!
77 totalCount: Int!
78}
79
80type OperationEdge {
81 cursor: String!
82 node: OperationUnion!
83}
84
85# An operation applied to a bug.
86interface Operation {
87 # The operations author.
88 author: Person!
89
90 # The datetime when this operation was issued.
91 date: Time!
92}
93
94type CreateOperation implements Operation, Authored {
95 author: Person!
96 date: Time!
97
98 title: String!
99 message: String!
100}
101
102type SetTitleOperation implements Operation, Authored {
103 author: Person!
104 date: Time!
105
106 title: String!
107}
108
109type AddCommentOperation implements Operation, Authored {
110 author: Person!
111 date: Time!
112
113 message: String!
114}
115
116type SetStatusOperation implements Operation, Authored {
117 author: Person!
118 date: Time!
119
120 status: Status!
121}
122
123type LabelChangeOperation implements Operation, Authored {
124 author: Person!
125 date: Time!
126
127 added: [Label!]!
128 removed: [Label!]!
129}
130
131union OperationUnion =
132 CreateOperation
133 | SetTitleOperation
134 | AddCommentOperation
135 | SetStatusOperation
136 | LabelChangeOperation
137
138# The connection type for Bug.
139type BugConnection {
140 # A list of edges.
141 edges: [BugEdge]!
142
143 # Information to aid in pagination.
144 pageInfo: PageInfo!
145
146 # Identifies the total count of items in the connection.
147 totalCount: Int!
148}
149
150# An edge in a connection.
151type BugEdge {
152 # A cursor for use in pagination.
153 cursor: String!
154
155 # The item at the end of the edge.
156 node: Bug!
157}
158
159type Bug {
160 id: String!
161 humanId: String!
162 title: String!
163 status: Status!
164
165 # A list of labels associated with the repository.
166 labels: [Label!]!
167
168 comments(input: ConnectionInput!): CommentConnection!
169
170 operations(input: ConnectionInput!): OperationConnection!
171}
172
173type Repository {
174 allBugs(input: ConnectionInput!): BugConnection!
175 bug(prefix: String!): Bug
176}
177
178type Query {
179 defaultRepository: Repository
180 repository(id: String!): Repository
181}