master
1// DO NOT EDIT. This is a generated file. Instead of this file, edit "issues.graphql".
2
3const Issue = `#graphql
4fragment Issue on Issue {
5 id
6 createdAt
7 closedAt
8 closed
9 author {
10 login
11 }
12 url
13 number
14 title
15 labels(first: 10) {
16 totalCount
17 nodes {
18 name
19 }
20 }
21 body
22 comments(first: 1) {
23 totalCount
24 }
25 assignees(first: 3) {
26 totalCount
27 }
28 repository {
29 isPrivate
30 nameWithOwner
31 owner {
32 login
33 }
34 name
35 }
36 reactionsTotal: reactions {
37 totalCount
38 }
39 timelineItemsTotal: timelineItems {
40 totalCount
41 }
42}`
43
44export type Issue = {
45 id: string
46 createdAt: string
47 closedAt: string | null
48 closed: boolean
49 author: {
50 login: string
51 } | null
52 url: string
53 number: number
54 title: string
55 labels: {
56 totalCount: number
57 nodes: Array<{
58 name: string
59 }> | null
60 } | null
61 body: string
62 comments: {
63 totalCount: number
64 }
65 assignees: {
66 totalCount: number
67 }
68 repository: {
69 isPrivate: boolean
70 nameWithOwner: string
71 owner: {
72 login: string
73 }
74 name: string
75 }
76 reactionsTotal: {
77 totalCount: number
78 }
79 timelineItemsTotal: {
80 totalCount: number
81 }
82}
83
84export const IssuesQuery = `#graphql
85${Issue}
86query IssuesQuery($username: String!, $num: Int = 100, $cursor: String) {
87 user(login: $username) {
88 issues(first: $num, after: $cursor, filterBy: {createdBy: $username}) {
89 totalCount
90 nodes {
91 ...Issue
92 }
93 pageInfo {
94 hasNextPage
95 endCursor
96 }
97 }
98 }
99 rateLimit {
100 limit
101 cost
102 remaining
103 resetAt
104 }
105}` as string & IssuesQuery
106
107export type IssuesQuery = (vars: {
108 username: string
109 num?: number | null
110 cursor?: string | null
111}) => {
112 user: {
113 issues: {
114 totalCount: number
115 nodes: Array<{} & Issue> | null
116 pageInfo: {
117 hasNextPage: boolean
118 endCursor: string | null
119 }
120 }
121 } | null
122 rateLimit: {
123 limit: number
124 cost: number
125 remaining: number
126 resetAt: string
127 } | null
128}