master
1// DO NOT EDIT. This is a generated file. Instead of this file, edit "issue-timeline.graphql".
2
3const IssueTimelineItem = `#graphql
4fragment IssueTimelineItem on IssueTimelineItem {
5 __typename
6 ... on ClosedEvent {
7 createdAt
8 actor {
9 login
10 }
11 }
12}`
13
14export type IssueTimelineItem =
15 | ({
16 __typename: string
17 } & {
18 createdAt: string
19 actor: {
20 login: string
21 } | null
22 })
23 | null
24
25export const IssueTimelineQuery = `#graphql
26${IssueTimelineItem}
27query IssueTimelineQuery($id: ID!, $num: Int = 100, $cursor: String) {
28 node(id: $id) {
29 ... on Issue {
30 timelineItems(first: $num, after: $cursor) {
31 totalCount
32 nodes {
33 ...IssueTimelineItem
34 }
35 pageInfo {
36 hasNextPage
37 endCursor
38 }
39 }
40 }
41 }
42 rateLimit {
43 limit
44 cost
45 remaining
46 resetAt
47 }
48}` as string & IssueTimelineQuery
49
50export type IssueTimelineQuery = (vars: {
51 id: string
52 num?: number | null
53 cursor?: string | null
54}) => {
55 node:
56 | ({} & {
57 timelineItems: {
58 totalCount: number
59 nodes: Array<{} & IssueTimelineItem> | null
60 pageInfo: {
61 hasNextPage: boolean
62 endCursor: string | null
63 }
64 }
65 })
66 | null
67 | null
68 rateLimit: {
69 limit: number
70 cost: number
71 remaining: number
72 resetAt: string
73 } | null
74}
75
76export const IssueTimelineBatchQuery = `#graphql
77${IssueTimelineItem}
78query IssueTimelineBatchQuery($ids: [ID!]!) {
79 nodes(ids: $ids) {
80 __typename
81 ... on Issue {
82 id
83 timelineItems(first: 100) {
84 totalCount
85 nodes {
86 ...IssueTimelineItem
87 }
88 }
89 }
90 }
91 rateLimit {
92 limit
93 cost
94 remaining
95 resetAt
96 }
97}` as string & IssueTimelineBatchQuery
98
99export type IssueTimelineBatchQuery = (vars: { ids: string[] }) => {
100 nodes: Array<
101 | ({
102 __typename: string
103 } & {
104 id: string
105 timelineItems: {
106 totalCount: number
107 nodes: Array<{} & IssueTimelineItem> | null
108 }
109 })
110 | null
111 >
112 rateLimit: {
113 limit: number
114 cost: number
115 remaining: number
116 resetAt: string
117 } | null
118}