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
479 lines (417 loc) · 15.5 KB
/
types.immutableTypes.ts
File metadata and controls
479 lines (417 loc) · 15.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
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
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 character from the Star Wars universe */
export type Character = {
/** The movies this character appears in */
readonly appearsIn: ReadonlyArray<Maybe<Episode>>;
/** The friends of the character, or an empty list if they have none */
readonly friends?: Maybe<ReadonlyArray<Maybe<Character>>>;
/** The friends of the character exposed as a connection with edges */
readonly friendsConnection: FriendsConnection;
/** The ID of the character */
readonly id: Scalars['ID']['output'];
/** The name of the character */
readonly name: Scalars['String']['output'];
};
/** A character from the Star Wars universe */
export type CharacterFriendsConnectionArgs = {
after?: InputMaybe<Scalars['ID']['input']>;
first?: InputMaybe<Scalars['Int']['input']>;
};
/** The input object sent when passing a color */
export type ColorInput = {
readonly blue: Scalars['Int']['input'];
readonly green: Scalars['Int']['input'];
readonly red: Scalars['Int']['input'];
};
/** An autonomous mechanical character in the Star Wars universe */
export type Droid = Character & {
readonly __typename?: 'Droid';
/** The movies this droid appears in */
readonly appearsIn: ReadonlyArray<Maybe<Episode>>;
/** This droid's friends, or an empty list if they have none */
readonly friends?: Maybe<ReadonlyArray<Maybe<Character>>>;
/** The friends of the droid exposed as a connection with edges */
readonly friendsConnection: FriendsConnection;
/** The ID of the droid */
readonly id: Scalars['ID']['output'];
/** What others call this droid */
readonly name: Scalars['String']['output'];
/** This droid's primary function */
readonly primaryFunction?: Maybe<Scalars['String']['output']>;
};
/** An autonomous mechanical character in the Star Wars universe */
export type DroidFriendsConnectionArgs = {
after?: InputMaybe<Scalars['ID']['input']>;
first?: InputMaybe<Scalars['Int']['input']>;
};
/** The episodes in the Star Wars trilogy */
export enum Episode {
/** Star Wars Episode V: The Empire Strikes Back, released in 1980. */
Empire = 'EMPIRE',
/** Star Wars Episode VI: Return of the Jedi, released in 1983. */
Jedi = 'JEDI',
/** Star Wars Episode IV: A New Hope, released in 1977. */
Newhope = 'NEWHOPE',
}
/** A connection object for a character's friends */
export type FriendsConnection = {
readonly __typename?: 'FriendsConnection';
/** The edges for each of the character's friends. */
readonly edges?: Maybe<ReadonlyArray<Maybe<FriendsEdge>>>;
/** A list of the friends, as a convenience when edges are not needed. */
readonly friends?: Maybe<ReadonlyArray<Maybe<Character>>>;
/** Information for paginating this connection */
readonly pageInfo: PageInfo;
/** The total number of friends */
readonly totalCount?: Maybe<Scalars['Int']['output']>;
};
/** An edge object for a character's friends */
export type FriendsEdge = {
readonly __typename?: 'FriendsEdge';
/** A cursor used for pagination */
readonly cursor: Scalars['ID']['output'];
/** The character represented by this friendship edge */
readonly node?: Maybe<Character>;
};
/** A humanoid creature from the Star Wars universe */
export type Human = Character & {
readonly __typename?: 'Human';
/** The movies this human appears in */
readonly appearsIn: ReadonlyArray<Maybe<Episode>>;
/** This human's friends, or an empty list if they have none */
readonly friends?: Maybe<ReadonlyArray<Maybe<Character>>>;
/** The friends of the human exposed as a connection with edges */
readonly friendsConnection: FriendsConnection;
/** Height in the preferred unit, default is meters */
readonly height?: Maybe<Scalars['Float']['output']>;
/** The home planet of the human, or null if unknown */
readonly homePlanet?: Maybe<Scalars['String']['output']>;
/** The ID of the human */
readonly id: Scalars['ID']['output'];
/** Mass in kilograms, or null if unknown */
readonly mass?: Maybe<Scalars['Float']['output']>;
/** What this human calls themselves */
readonly name: Scalars['String']['output'];
/** A list of starships this person has piloted, or an empty list if none */
readonly starships?: Maybe<ReadonlyArray<Maybe<Starship>>>;
};
/** A humanoid creature from the Star Wars universe */
export type HumanFriendsConnectionArgs = {
after?: InputMaybe<Scalars['ID']['input']>;
first?: InputMaybe<Scalars['Int']['input']>;
};
/** A humanoid creature from the Star Wars universe */
export type HumanHeightArgs = {
unit?: InputMaybe<LengthUnit>;
};
/** Units of height */
export enum LengthUnit {
/** Primarily used in the United States */
Foot = 'FOOT',
/** The standard unit around the world */
Meter = 'METER',
}
/** The mutation type, represents all updates we can make to our data */
export type Mutation = {
readonly __typename?: 'Mutation';
readonly createReview?: Maybe<Review>;
};
/** The mutation type, represents all updates we can make to our data */
export type MutationCreateReviewArgs = {
episode?: InputMaybe<Episode>;
review: ReviewInput;
};
/** Information for paginating this connection */
export type PageInfo = {
readonly __typename?: 'PageInfo';
readonly endCursor?: Maybe<Scalars['ID']['output']>;
readonly hasNextPage: Scalars['Boolean']['output'];
readonly startCursor?: Maybe<Scalars['ID']['output']>;
};
/** The query type, represents all of the entry points into our object graph */
export type Query = {
readonly __typename?: 'Query';
readonly character?: Maybe<Character>;
readonly droid?: Maybe<Droid>;
readonly hero?: Maybe<Character>;
readonly human?: Maybe<Human>;
readonly reviews?: Maybe<ReadonlyArray<Maybe<Review>>>;
readonly search?: Maybe<ReadonlyArray<Maybe<SearchResult>>>;
readonly starship?: Maybe<Starship>;
};
/** The query type, represents all of the entry points into our object graph */
export type QueryCharacterArgs = {
id: Scalars['ID']['input'];
};
/** The query type, represents all of the entry points into our object graph */
export type QueryDroidArgs = {
id: Scalars['ID']['input'];
};
/** The query type, represents all of the entry points into our object graph */
export type QueryHeroArgs = {
episode?: InputMaybe<Episode>;
};
/** The query type, represents all of the entry points into our object graph */
export type QueryHumanArgs = {
id: Scalars['ID']['input'];
};
/** The query type, represents all of the entry points into our object graph */
export type QueryReviewsArgs = {
episode: Episode;
};
/** The query type, represents all of the entry points into our object graph */
export type QuerySearchArgs = {
text?: InputMaybe<Scalars['String']['input']>;
};
/** The query type, represents all of the entry points into our object graph */
export type QueryStarshipArgs = {
id: Scalars['ID']['input'];
};
/** Represents a review for a movie */
export type Review = {
readonly __typename?: 'Review';
/** Comment about the movie */
readonly commentary?: Maybe<Scalars['String']['output']>;
/** The number of stars this review gave, 1-5 */
readonly stars: Scalars['Int']['output'];
};
/** The input object sent when someone is creating a new review */
export type ReviewInput = {
/** Comment about the movie, optional */
readonly commentary?: InputMaybe<Scalars['String']['input']>;
/** Favorite color, optional */
readonly favoriteColor?: InputMaybe<ColorInput>;
/** 0-5 stars */
readonly stars: Scalars['Int']['input'];
};
export type SearchResult = Droid | Human | Starship;
export type Starship = {
readonly __typename?: 'Starship';
/** The ID of the starship */
readonly id: Scalars['ID']['output'];
/** Length of the starship, along the longest axis */
readonly length?: Maybe<Scalars['Float']['output']>;
/** The name of the starship */
readonly name: Scalars['String']['output'];
};
export type StarshipLengthArgs = {
unit?: InputMaybe<LengthUnit>;
};
/** The episodes in the Star Wars trilogy */
export type Episode =
/** Star Wars Episode V: The Empire Strikes Back, released in 1980. */
| 'EMPIRE'
/** Star Wars Episode VI: Return of the Jedi, released in 1983. */
| 'JEDI'
/** Star Wars Episode IV: A New Hope, released in 1977. */
| 'NEWHOPE';
/** The input object sent when someone is creating a new review */
export type ReviewInput = {
/** Comment about the movie, optional */
commentary: string;
/** Favorite color, optional */
favoriteColor: ColorInput;
/** 0-5 stars */
stars: number;
};
export type CreateReviewForEpisodeMutationVariables = Exact<{
episode: Episode;
review: ReviewInput;
}>;
export type CreateReviewForEpisodeMutation = {
readonly __typename?: 'Mutation';
readonly createReview?: {
readonly __typename?: 'Review';
readonly stars: number;
readonly commentary?: string | null;
} | null;
};
export type ExcludeQueryAlphaQueryVariables = Exact<{
episode?: Episode | null;
}>;
export type ExcludeQueryAlphaQuery = {
readonly __typename?: 'Query';
readonly hero?:
| { readonly __typename?: 'Droid'; readonly name: string }
| { readonly __typename?: 'Human'; readonly name: string }
| null;
};
export type ExcludeQueryBetaQueryVariables = Exact<{
episode?: Episode | null;
}>;
export type ExcludeQueryBetaQuery = {
readonly __typename?: 'Query';
readonly hero?:
| { readonly __typename?: 'Droid'; readonly name: string }
| { readonly __typename?: 'Human'; readonly name: string }
| null;
};
export type HeroAndFriendsNamesQueryVariables = Exact<{
episode?: Episode | null;
}>;
export type HeroAndFriendsNamesQuery = {
readonly __typename?: 'Query';
readonly hero?:
| {
readonly __typename?: 'Droid';
readonly name: string;
readonly friends?: ReadonlyArray<
| { readonly __typename?: 'Droid'; readonly name: string }
| { readonly __typename?: 'Human'; readonly name: string }
| null
> | null;
}
| {
readonly __typename?: 'Human';
readonly name: string;
readonly friends?: ReadonlyArray<
| { readonly __typename?: 'Droid'; readonly name: string }
| { readonly __typename?: 'Human'; readonly name: string }
| null
> | null;
}
| null;
};
export type HeroAppearsInQueryVariables = Exact<{ [key: string]: never }>;
export type HeroAppearsInQuery = {
readonly __typename?: 'Query';
readonly hero?:
| { readonly __typename?: 'Droid'; readonly name: string; readonly appearsIn: ReadonlyArray<Episode | null> }
| { readonly __typename?: 'Human'; readonly name: string; readonly appearsIn: ReadonlyArray<Episode | null> }
| null;
};
export type HeroDetailsQueryVariables = Exact<{
episode?: Episode | null;
}>;
export type HeroDetailsQuery = {
readonly __typename?: 'Query';
readonly hero?:
| { readonly __typename?: 'Droid'; readonly primaryFunction?: string | null; readonly name: string }
| { readonly __typename?: 'Human'; readonly height?: number | null; readonly name: string }
| null;
};
type HeroDetails_Droid_Fragment = {
readonly __typename?: 'Droid';
readonly primaryFunction?: string | null;
readonly name: string;
};
type HeroDetails_Human_Fragment = {
readonly __typename?: 'Human';
readonly height?: number | null;
readonly name: string;
};
export type HeroDetailsFragment = HeroDetails_Droid_Fragment | HeroDetails_Human_Fragment;
export type HeroDetailsWithFragmentQueryVariables = Exact<{
episode?: Episode | null;
}>;
export type HeroDetailsWithFragmentQuery = {
readonly __typename?: 'Query';
readonly hero?:
| { readonly __typename?: 'Droid'; readonly primaryFunction?: string | null; readonly name: string }
| { readonly __typename?: 'Human'; readonly height?: number | null; readonly name: string }
| null;
};
export type HeroNameQueryVariables = Exact<{
episode?: Episode | null;
}>;
export type HeroNameQuery = {
readonly __typename?: 'Query';
readonly hero?:
| { readonly __typename?: 'Droid'; readonly name: string }
| { readonly __typename?: 'Human'; readonly name: string }
| null;
};
export type HeroNameConditionalInclusionQueryVariables = Exact<{
episode?: Episode | null;
includeName: boolean;
}>;
export type HeroNameConditionalInclusionQuery = {
readonly __typename?: 'Query';
readonly hero?:
| { readonly __typename?: 'Droid'; readonly name?: string }
| { readonly __typename?: 'Human'; readonly name?: string }
| null;
};
export type HeroNameConditionalExclusionQueryVariables = Exact<{
episode?: Episode | null;
skipName: boolean;
}>;
export type HeroNameConditionalExclusionQuery = {
readonly __typename?: 'Query';
readonly hero?:
| { readonly __typename?: 'Droid'; readonly name?: string }
| { readonly __typename?: 'Human'; readonly name?: string }
| null;
};
export type HeroParentTypeDependentFieldQueryVariables = Exact<{
episode?: Episode | null;
}>;
export type HeroParentTypeDependentFieldQuery = {
readonly __typename?: 'Query';
readonly hero?:
| {
readonly __typename?: 'Droid';
readonly name: string;
readonly friends?: ReadonlyArray<
| { readonly __typename?: 'Droid'; readonly name: string }
| { readonly __typename?: 'Human'; readonly height?: number | null; readonly name: string }
| null
> | null;
}
| {
readonly __typename?: 'Human';
readonly name: string;
readonly friends?: ReadonlyArray<
| { readonly __typename?: 'Droid'; readonly name: string }
| { readonly __typename?: 'Human'; readonly height?: number | null; readonly name: string }
| null
> | null;
}
| null;
};
export type HeroTypeDependentAliasedFieldQueryVariables = Exact<{
episode?: Episode | null;
}>;
export type HeroTypeDependentAliasedFieldQuery = {
readonly __typename?: 'Query';
readonly hero?:
| { readonly __typename?: 'Droid'; readonly property?: string | null }
| { readonly __typename?: 'Human'; readonly property?: string | null }
| null;
};
export type HumanFieldsFragment = {
readonly __typename?: 'Human';
readonly name: string;
readonly mass?: number | null;
};
export type HumanWithNullHeightQueryVariables = Exact<{ [key: string]: never }>;
export type HumanWithNullHeightQuery = {
readonly __typename?: 'Query';
readonly human?: { readonly __typename?: 'Human'; readonly name: string; readonly mass?: number | null } | null;
};
export type TwoHeroesQueryVariables = Exact<{ [key: string]: never }>;
export type TwoHeroesQuery = {
readonly __typename?: 'Query';
readonly r2?:
| { readonly __typename?: 'Droid'; readonly name: string }
| { readonly __typename?: 'Human'; readonly name: string }
| null;
readonly luke?:
| { readonly __typename?: 'Droid'; readonly name: string }
| { readonly __typename?: 'Human'; readonly name: string }
| null;
};