1# Always fetch open and closed counts unconditionally so both numbers are
2# visible in the toggle header regardless of which tab is active.
3# The paginated `bugs` alias fetches the selected-status list separately.
4query BugList(
5 $ref: String
6 $openQuery: String!
7 $closedQuery: String!
8 $listQuery: String!
9 $first: Int
10 $after: String
11) {
12 repository(ref: $ref) {
13 openCount: allBugs(query: $openQuery, first: 1) {
14 totalCount
15 }
16 closedCount: allBugs(query: $closedQuery, first: 1) {
17 totalCount
18 }
19 bugs: allBugs(query: $listQuery, first: $first, after: $after) {
20 totalCount
21 pageInfo {
22 hasNextPage
23 endCursor
24 }
25 nodes {
26 id
27 humanId
28 status
29 title
30 labels {
31 name
32 color {
33 R
34 G
35 B
36 }
37 }
38 author {
39 id
40 humanId
41 displayName
42 avatarUrl
43 }
44 createdAt
45 comments {
46 totalCount
47 }
48 }
49 }
50 }
51}