forked from dotansimha/graphql-code-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.immutableTypes.ts
More file actions
338 lines (303 loc) · 11.5 KB
/
types.immutableTypes.ts
File metadata and controls
338 lines (303 loc) · 11.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string; output: string };
String: { input: string; output: string };
Boolean: { input: boolean; output: boolean };
Int: { input: number; output: number };
Float: { input: number; output: number };
};
/** A comment about an entry, submitted by a user */
export type Comment = {
readonly __typename?: 'Comment';
/** The text of the comment */
readonly content: Scalars['String']['output'];
/** A timestamp of when the comment was posted */
readonly createdAt: Scalars['Float']['output'];
/** The SQL ID of this entry */
readonly id: Scalars['Int']['output'];
/** The GitHub user who posted the comment */
readonly postedBy: User;
/** The repository which this comment is about */
readonly repoName: Scalars['String']['output'];
};
/** Information about a GitHub repository submitted to GitHunt */
export type Entry = {
readonly __typename?: 'Entry';
/** The number of comments posted about this repository */
readonly commentCount: Scalars['Int']['output'];
/** Comments posted about this repository */
readonly comments: ReadonlyArray<Maybe<Comment>>;
/** A timestamp of when the entry was submitted */
readonly createdAt: Scalars['Float']['output'];
/** The hot score of this repository */
readonly hotScore: Scalars['Float']['output'];
/** The SQL ID of this entry */
readonly id: Scalars['Int']['output'];
/** The GitHub user who submitted this entry */
readonly postedBy: User;
/** Information about the repository from GitHub */
readonly repository: Repository;
/** The score of this repository, upvotes - downvotes */
readonly score: Scalars['Int']['output'];
/** XXX to be changed */
readonly vote: Vote;
};
/** Information about a GitHub repository submitted to GitHunt */
export type EntryCommentsArgs = {
limit?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>;
};
/** A list of options for the sort order of the feed */
export enum FeedType {
/** Sort by a combination of freshness and score, using Reddit's algorithm */
Hot = 'HOT',
/** Newest entries first */
New = 'NEW',
/** Highest score entries first */
Top = 'TOP',
}
export type Mutation = {
readonly __typename?: 'Mutation';
/** Comment on a repository, returns the new comment */
readonly submitComment?: Maybe<Comment>;
/** Submit a new repository, returns the new submission */
readonly submitRepository?: Maybe<Entry>;
/** Vote on a repository submission, returns the submission that was voted on */
readonly vote?: Maybe<Entry>;
};
export type MutationSubmitCommentArgs = {
commentContent: Scalars['String']['input'];
repoFullName: Scalars['String']['input'];
};
export type MutationSubmitRepositoryArgs = {
repoFullName: Scalars['String']['input'];
};
export type MutationVoteArgs = {
repoFullName: Scalars['String']['input'];
type: VoteType;
};
export type Query = {
readonly __typename?: 'Query';
/** Return the currently logged in user, or null if nobody is logged in */
readonly currentUser?: Maybe<User>;
/** A single entry */
readonly entry?: Maybe<Entry>;
/** A feed of repository submissions */
readonly feed?: Maybe<ReadonlyArray<Maybe<Entry>>>;
};
export type QueryEntryArgs = {
repoFullName: Scalars['String']['input'];
};
export type QueryFeedArgs = {
limit?: InputMaybe<Scalars['Int']['input']>;
offset?: InputMaybe<Scalars['Int']['input']>;
type: FeedType;
};
/**
* A repository object from the GitHub API. This uses the exact field names returned by the
* GitHub API for simplicity, even though the convention for GraphQL is usually to camel case.
*/
export type Repository = {
readonly __typename?: 'Repository';
/** The description of the repository */
readonly description?: Maybe<Scalars['String']['output']>;
/** The full name of the repository with the username, e.g. apollostack/GitHunt-API */
readonly full_name: Scalars['String']['output'];
/** The link to the repository on GitHub */
readonly html_url: Scalars['String']['output'];
/** Just the name of the repository, e.g. GitHunt-API */
readonly name: Scalars['String']['output'];
/** The number of open issues on this repository on GitHub */
readonly open_issues_count?: Maybe<Scalars['Int']['output']>;
/** The owner of this repository on GitHub, e.g. apollostack */
readonly owner?: Maybe<User>;
/** The number of people who have starred this repository on GitHub */
readonly stargazers_count: Scalars['Int']['output'];
};
export type Subscription = {
readonly __typename?: 'Subscription';
/** Subscription fires on every comment added */
readonly commentAdded?: Maybe<Comment>;
};
export type SubscriptionCommentAddedArgs = {
repoFullName: Scalars['String']['input'];
};
/** A user object from the GitHub API. This uses the exact field names returned from the GitHub API. */
export type User = {
readonly __typename?: 'User';
/** The URL to a directly embeddable image for this user's avatar */
readonly avatar_url: Scalars['String']['output'];
/** The URL of this user's GitHub page */
readonly html_url: Scalars['String']['output'];
/** The name of the user, e.g. apollostack */
readonly login: Scalars['String']['output'];
};
/** XXX to be removed */
export type Vote = {
readonly __typename?: 'Vote';
readonly vote_value: Scalars['Int']['output'];
};
/** The type of vote to record, when submitting a vote */
export enum VoteType {
Cancel = 'CANCEL',
Down = 'DOWN',
Up = 'UP',
}
export type OnCommentAddedSubscriptionVariables = Exact<{
repoFullName: string;
}>;
export type OnCommentAddedSubscription = {
readonly __typename?: 'Subscription';
readonly commentAdded?: {
readonly __typename?: 'Comment';
readonly id: number;
readonly createdAt: number;
readonly content: string;
readonly postedBy: { readonly __typename?: 'User'; readonly login: string; readonly html_url: string };
} | null;
};
export type CommentQueryVariables = Exact<{
repoFullName: string;
limit?: number | null;
offset?: number | null;
}>;
export type CommentQuery = {
readonly __typename?: 'Query';
readonly currentUser?: { readonly __typename?: 'User'; readonly login: string; readonly html_url: string } | null;
readonly entry?: {
readonly __typename?: 'Entry';
readonly id: number;
readonly createdAt: number;
readonly commentCount: number;
readonly postedBy: { readonly __typename?: 'User'; readonly login: string; readonly html_url: string };
readonly comments: ReadonlyArray<{
readonly __typename?: 'Comment';
readonly id: number;
readonly createdAt: number;
readonly content: string;
readonly postedBy: { readonly __typename?: 'User'; readonly login: string; readonly html_url: string };
} | null>;
readonly repository: {
readonly __typename?: 'Repository';
readonly description?: string | null;
readonly open_issues_count?: number | null;
readonly stargazers_count: number;
readonly full_name: string;
readonly html_url: string;
};
} | null;
};
export type CommentsPageCommentFragment = {
readonly __typename?: 'Comment';
readonly id: number;
readonly createdAt: number;
readonly content: string;
readonly postedBy: { readonly __typename?: 'User'; readonly login: string; readonly html_url: string };
};
export type CurrentUserForProfileQueryVariables = Exact<{ [key: string]: never }>;
export type CurrentUserForProfileQuery = {
readonly __typename?: 'Query';
readonly currentUser?: { readonly __typename?: 'User'; readonly login: string; readonly avatar_url: string } | null;
};
export type FeedEntryFragment = {
readonly __typename?: 'Entry';
readonly id: number;
readonly commentCount: number;
readonly score: number;
readonly createdAt: number;
readonly repository: {
readonly __typename?: 'Repository';
readonly full_name: string;
readonly html_url: string;
readonly description?: string | null;
readonly stargazers_count: number;
readonly open_issues_count?: number | null;
readonly owner?: { readonly __typename?: 'User'; readonly avatar_url: string } | null;
};
readonly vote: { readonly __typename?: 'Vote'; readonly vote_value: number };
readonly postedBy: { readonly __typename?: 'User'; readonly html_url: string; readonly login: string };
};
export type FeedQueryVariables = Exact<{
type: FeedType;
offset?: number | null;
limit?: number | null;
}>;
export type FeedQuery = {
readonly __typename?: 'Query';
readonly currentUser?: { readonly __typename?: 'User'; readonly login: string } | null;
readonly feed?: ReadonlyArray<{
readonly __typename?: 'Entry';
readonly id: number;
readonly commentCount: number;
readonly score: number;
readonly createdAt: number;
readonly repository: {
readonly __typename?: 'Repository';
readonly full_name: string;
readonly html_url: string;
readonly description?: string | null;
readonly stargazers_count: number;
readonly open_issues_count?: number | null;
readonly owner?: { readonly __typename?: 'User'; readonly avatar_url: string } | null;
};
readonly vote: { readonly __typename?: 'Vote'; readonly vote_value: number };
readonly postedBy: { readonly __typename?: 'User'; readonly html_url: string; readonly login: string };
} | null> | null;
};
export type SubmitRepositoryMutationVariables = Exact<{
repoFullName: string;
}>;
export type SubmitRepositoryMutation = {
readonly __typename?: 'Mutation';
readonly submitRepository?: { readonly __typename?: 'Entry'; readonly createdAt: number } | null;
};
export type RepoInfoFragment = {
readonly __typename?: 'Entry';
readonly createdAt: number;
readonly repository: {
readonly __typename?: 'Repository';
readonly description?: string | null;
readonly stargazers_count: number;
readonly open_issues_count?: number | null;
};
readonly postedBy: { readonly __typename?: 'User'; readonly html_url: string; readonly login: string };
};
export type SubmitCommentMutationVariables = Exact<{
repoFullName: string;
commentContent: string;
}>;
export type SubmitCommentMutation = {
readonly __typename?: 'Mutation';
readonly submitComment?: {
readonly __typename?: 'Comment';
readonly id: number;
readonly createdAt: number;
readonly content: string;
readonly postedBy: { readonly __typename?: 'User'; readonly login: string; readonly html_url: string };
} | null;
};
export type VoteButtonsFragment = {
readonly __typename?: 'Entry';
readonly score: number;
readonly vote: { readonly __typename?: 'Vote'; readonly vote_value: number };
};
export type VoteMutationVariables = Exact<{
repoFullName: string;
type: VoteType;
}>;
export type VoteMutation = {
readonly __typename?: 'Mutation';
readonly vote?: {
readonly __typename?: 'Entry';
readonly score: number;
readonly id: number;
readonly vote: { readonly __typename?: 'Vote'; readonly vote_value: number };
} | null;
};