forked from alura/techguide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgql_types.ts
430 lines (367 loc) · 16.2 KB
/
gql_types.ts
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
import { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql';
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
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]> };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: string;
String: string;
Boolean: boolean;
Int: number;
Float: number;
UUID: string;
};
export type Card = {
__typename?: 'Card';
aditionalObjectives?: Maybe<Array<Maybe<CardAditionalObjective>>>;
aluraContents?: Maybe<Array<Maybe<CardContent>>>;
collaborations?: Maybe<Array<Maybe<GuideCollaboration>>>;
contents?: Maybe<Array<Maybe<CardContent>>>;
expertises?: Maybe<Array<Maybe<GuideExpertise>>>;
fiapContents?: Maybe<Array<Maybe<CardContent>>>;
id?: Maybe<Scalars['String']>;
keyObjectives?: Maybe<Array<Maybe<CardKeyObjective>>>;
logo?: Maybe<Scalars['String']>;
name?: Maybe<Scalars['String']>;
shortDescription?: Maybe<Scalars['String']>;
slug?: Maybe<Scalars['String']>;
};
export type CardAditionalObjective = {
__typename?: 'CardAditionalObjective';
id?: Maybe<Scalars['String']>;
name?: Maybe<Scalars['String']>;
slug?: Maybe<Scalars['String']>;
};
export type CardContent = {
__typename?: 'CardContent';
id?: Maybe<Scalars['String']>;
link?: Maybe<Scalars['String']>;
slug?: Maybe<Scalars['String']>;
title?: Maybe<Scalars['String']>;
type?: Maybe<CardContentType>;
};
export enum CardContentType {
Aluraplus = 'ALURAPLUS',
Article = 'ARTICLE',
Book = 'BOOK',
Challenge = 'CHALLENGE',
Course = 'COURSE',
Podcast = 'PODCAST',
Site = 'SITE',
Youtube = 'YOUTUBE'
}
export type CardFilters = {
id?: InputMaybe<FieldFilter>;
name?: InputMaybe<FieldFilter>;
slug?: InputMaybe<FieldFilter>;
};
export type CardInput = {
slug: Scalars['String'];
};
export type CardKeyObjective = {
__typename?: 'CardKeyObjective';
id?: Maybe<Scalars['String']>;
name?: Maybe<Scalars['String']>;
slug?: Maybe<Scalars['String']>;
};
export type CardsInput = {
filter?: InputMaybe<CardFilters>;
limit?: InputMaybe<Scalars['Int']>;
locale?: InputMaybe<SiteLocale>;
offset?: InputMaybe<Scalars['Int']>;
};
export type CreateSampleTextInput = {
text: Scalars['String'];
};
export type FieldFilter = {
eq?: InputMaybe<Scalars['String']>;
gte?: InputMaybe<Scalars['String']>;
lt?: InputMaybe<Scalars['String']>;
};
export type Guide = {
__typename?: 'Guide';
collaborations?: Maybe<Array<Maybe<GuideCollaboration>>>;
expertises?: Maybe<Array<Maybe<GuideExpertise>>>;
faq?: Maybe<Array<Maybe<GuideFaq>>>;
id?: Maybe<Scalars['String']>;
name?: Maybe<Scalars['String']>;
slug?: Maybe<Scalars['String']>;
tags?: Maybe<Array<Maybe<Scalars['String']>>>;
video?: Maybe<Scalars['String']>;
};
export type GuideCard = {
__typename?: 'GuideCard';
item?: Maybe<Card>;
optional?: Maybe<Scalars['Boolean']>;
priority?: Maybe<Scalars['Int']>;
};
export type GuideCollaboration = {
__typename?: 'GuideCollaboration';
cards?: Maybe<Array<Maybe<GuideCard>>>;
guide?: Maybe<Guide>;
name?: Maybe<Scalars['String']>;
};
export type GuideExpertise = {
__typename?: 'GuideExpertise';
cards?: Maybe<Array<Maybe<GuideCard>>>;
guide?: Maybe<Guide>;
name?: Maybe<Scalars['String']>;
};
export type GuideFaq = {
__typename?: 'GuideFAQ';
answer?: Maybe<Scalars['String']>;
title?: Maybe<Scalars['String']>;
};
export type GuideFilters = {
id?: InputMaybe<FieldFilter>;
name?: InputMaybe<FieldFilter>;
slug?: InputMaybe<FieldFilter>;
};
export type GuideInput = {
slug: Scalars['String'];
};
export type GuidesInput = {
filter?: InputMaybe<GuideFilters>;
limit?: InputMaybe<Scalars['Int']>;
locale?: InputMaybe<SiteLocale>;
offset?: InputMaybe<Scalars['Int']>;
};
export type Mutation = {
__typename?: 'Mutation';
createSampleText: Scalars['String'];
};
export type MutationCreateSampleTextArgs = {
input?: InputMaybe<CreateSampleTextInput>;
};
export type Query = {
__typename?: 'Query';
card?: Maybe<Card>;
cards: Array<Maybe<Card>>;
greet?: Maybe<Scalars['String']>;
guide?: Maybe<Guide>;
guides: Array<Maybe<Guide>>;
};
export type QueryCardArgs = {
input?: InputMaybe<CardInput>;
locale?: InputMaybe<SiteLocale>;
};
export type QueryCardsArgs = {
input?: InputMaybe<CardsInput>;
locale?: InputMaybe<SiteLocale>;
};
export type QueryGuideArgs = {
input?: InputMaybe<GuideInput>;
locale?: InputMaybe<SiteLocale>;
};
export type QueryGuidesArgs = {
input?: InputMaybe<GuidesInput>;
locale?: InputMaybe<SiteLocale>;
};
export enum SiteLocale {
EnUs = 'EN_US',
Es = 'ES',
PtBr = 'PT_BR'
}
export type ResolverTypeWrapper<T> = Promise<T> | T;
export type ResolverWithResolve<TResult, TParent, TContext, TArgs> = {
resolve: ResolverFn<TResult, TParent, TContext, TArgs>;
};
export type Resolver<TResult, TParent = {}, TContext = {}, TArgs = {}> = ResolverFn<TResult, TParent, TContext, TArgs> | ResolverWithResolve<TResult, TParent, TContext, TArgs>;
export type ResolverFn<TResult, TParent, TContext, TArgs> = (
parent: TParent,
args: TArgs,
context: TContext,
info: GraphQLResolveInfo
) => Promise<TResult> | TResult;
export type SubscriptionSubscribeFn<TResult, TParent, TContext, TArgs> = (
parent: TParent,
args: TArgs,
context: TContext,
info: GraphQLResolveInfo
) => AsyncIterable<TResult> | Promise<AsyncIterable<TResult>>;
export type SubscriptionResolveFn<TResult, TParent, TContext, TArgs> = (
parent: TParent,
args: TArgs,
context: TContext,
info: GraphQLResolveInfo
) => TResult | Promise<TResult>;
export interface SubscriptionSubscriberObject<TResult, TKey extends string, TParent, TContext, TArgs> {
subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult }, TParent, TContext, TArgs>;
resolve?: SubscriptionResolveFn<TResult, { [key in TKey]: TResult }, TContext, TArgs>;
}
export interface SubscriptionResolverObject<TResult, TParent, TContext, TArgs> {
subscribe: SubscriptionSubscribeFn<any, TParent, TContext, TArgs>;
resolve: SubscriptionResolveFn<TResult, any, TContext, TArgs>;
}
export type SubscriptionObject<TResult, TKey extends string, TParent, TContext, TArgs> =
| SubscriptionSubscriberObject<TResult, TKey, TParent, TContext, TArgs>
| SubscriptionResolverObject<TResult, TParent, TContext, TArgs>;
export type SubscriptionResolver<TResult, TKey extends string, TParent = {}, TContext = {}, TArgs = {}> =
| ((...args: any[]) => SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>)
| SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>;
export type TypeResolveFn<TTypes, TParent = {}, TContext = {}> = (
parent: TParent,
context: TContext,
info: GraphQLResolveInfo
) => Maybe<TTypes> | Promise<Maybe<TTypes>>;
export type IsTypeOfResolverFn<T = {}, TContext = {}> = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise<boolean>;
export type NextResolverFn<T> = () => Promise<T>;
export type DirectiveResolverFn<TResult = {}, TParent = {}, TContext = {}, TArgs = {}> = (
next: NextResolverFn<TResult>,
parent: TParent,
args: TArgs,
context: TContext,
info: GraphQLResolveInfo
) => TResult | Promise<TResult>;
/** Mapping between all available schema types and the resolvers types */
export type ResolversTypes = {
Boolean: ResolverTypeWrapper<Scalars['Boolean']>;
Card: ResolverTypeWrapper<Card>;
CardAditionalObjective: ResolverTypeWrapper<CardAditionalObjective>;
CardContent: ResolverTypeWrapper<CardContent>;
CardContentType: CardContentType;
CardFilters: CardFilters;
CardInput: CardInput;
CardKeyObjective: ResolverTypeWrapper<CardKeyObjective>;
CardsInput: CardsInput;
CreateSampleTextInput: CreateSampleTextInput;
FieldFilter: FieldFilter;
Guide: ResolverTypeWrapper<Guide>;
GuideCard: ResolverTypeWrapper<GuideCard>;
GuideCollaboration: ResolverTypeWrapper<GuideCollaboration>;
GuideExpertise: ResolverTypeWrapper<GuideExpertise>;
GuideFAQ: ResolverTypeWrapper<GuideFaq>;
GuideFilters: GuideFilters;
GuideInput: GuideInput;
GuidesInput: GuidesInput;
Int: ResolverTypeWrapper<Scalars['Int']>;
Mutation: ResolverTypeWrapper<{}>;
Query: ResolverTypeWrapper<{}>;
SiteLocale: SiteLocale;
String: ResolverTypeWrapper<Scalars['String']>;
UUID: ResolverTypeWrapper<Scalars['UUID']>;
};
/** Mapping between all available schema types and the resolvers parents */
export type ResolversParentTypes = {
Boolean: Scalars['Boolean'];
Card: Card;
CardAditionalObjective: CardAditionalObjective;
CardContent: CardContent;
CardFilters: CardFilters;
CardInput: CardInput;
CardKeyObjective: CardKeyObjective;
CardsInput: CardsInput;
CreateSampleTextInput: CreateSampleTextInput;
FieldFilter: FieldFilter;
Guide: Guide;
GuideCard: GuideCard;
GuideCollaboration: GuideCollaboration;
GuideExpertise: GuideExpertise;
GuideFAQ: GuideFaq;
GuideFilters: GuideFilters;
GuideInput: GuideInput;
GuidesInput: GuidesInput;
Int: Scalars['Int'];
Mutation: {};
Query: {};
String: Scalars['String'];
UUID: Scalars['UUID'];
};
export type CardResolvers<ContextType = any, ParentType extends ResolversParentTypes['Card'] = ResolversParentTypes['Card']> = {
aditionalObjectives?: Resolver<Maybe<Array<Maybe<ResolversTypes['CardAditionalObjective']>>>, ParentType, ContextType>;
aluraContents?: Resolver<Maybe<Array<Maybe<ResolversTypes['CardContent']>>>, ParentType, ContextType>;
collaborations?: Resolver<Maybe<Array<Maybe<ResolversTypes['GuideCollaboration']>>>, ParentType, ContextType>;
contents?: Resolver<Maybe<Array<Maybe<ResolversTypes['CardContent']>>>, ParentType, ContextType>;
expertises?: Resolver<Maybe<Array<Maybe<ResolversTypes['GuideExpertise']>>>, ParentType, ContextType>;
fiapContents?: Resolver<Maybe<Array<Maybe<ResolversTypes['CardContent']>>>, ParentType, ContextType>;
id?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
keyObjectives?: Resolver<Maybe<Array<Maybe<ResolversTypes['CardKeyObjective']>>>, ParentType, ContextType>;
logo?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
name?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
shortDescription?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
slug?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
};
export type CardAditionalObjectiveResolvers<ContextType = any, ParentType extends ResolversParentTypes['CardAditionalObjective'] = ResolversParentTypes['CardAditionalObjective']> = {
id?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
name?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
slug?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
};
export type CardContentResolvers<ContextType = any, ParentType extends ResolversParentTypes['CardContent'] = ResolversParentTypes['CardContent']> = {
id?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
link?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
slug?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
title?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
type?: Resolver<Maybe<ResolversTypes['CardContentType']>, ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
};
export type CardKeyObjectiveResolvers<ContextType = any, ParentType extends ResolversParentTypes['CardKeyObjective'] = ResolversParentTypes['CardKeyObjective']> = {
id?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
name?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
slug?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
};
export type GuideResolvers<ContextType = any, ParentType extends ResolversParentTypes['Guide'] = ResolversParentTypes['Guide']> = {
collaborations?: Resolver<Maybe<Array<Maybe<ResolversTypes['GuideCollaboration']>>>, ParentType, ContextType>;
expertises?: Resolver<Maybe<Array<Maybe<ResolversTypes['GuideExpertise']>>>, ParentType, ContextType>;
faq?: Resolver<Maybe<Array<Maybe<ResolversTypes['GuideFAQ']>>>, ParentType, ContextType>;
id?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
name?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
slug?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
tags?: Resolver<Maybe<Array<Maybe<ResolversTypes['String']>>>, ParentType, ContextType>;
video?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
};
export type GuideCardResolvers<ContextType = any, ParentType extends ResolversParentTypes['GuideCard'] = ResolversParentTypes['GuideCard']> = {
item?: Resolver<Maybe<ResolversTypes['Card']>, ParentType, ContextType>;
optional?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>;
priority?: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
};
export type GuideCollaborationResolvers<ContextType = any, ParentType extends ResolversParentTypes['GuideCollaboration'] = ResolversParentTypes['GuideCollaboration']> = {
cards?: Resolver<Maybe<Array<Maybe<ResolversTypes['GuideCard']>>>, ParentType, ContextType>;
guide?: Resolver<Maybe<ResolversTypes['Guide']>, ParentType, ContextType>;
name?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
};
export type GuideExpertiseResolvers<ContextType = any, ParentType extends ResolversParentTypes['GuideExpertise'] = ResolversParentTypes['GuideExpertise']> = {
cards?: Resolver<Maybe<Array<Maybe<ResolversTypes['GuideCard']>>>, ParentType, ContextType>;
guide?: Resolver<Maybe<ResolversTypes['Guide']>, ParentType, ContextType>;
name?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
};
export type GuideFaqResolvers<ContextType = any, ParentType extends ResolversParentTypes['GuideFAQ'] = ResolversParentTypes['GuideFAQ']> = {
answer?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
title?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
};
export type MutationResolvers<ContextType = any, ParentType extends ResolversParentTypes['Mutation'] = ResolversParentTypes['Mutation']> = {
createSampleText?: Resolver<ResolversTypes['String'], ParentType, ContextType, Partial<MutationCreateSampleTextArgs>>;
};
export type QueryResolvers<ContextType = any, ParentType extends ResolversParentTypes['Query'] = ResolversParentTypes['Query']> = {
card?: Resolver<Maybe<ResolversTypes['Card']>, ParentType, ContextType, Partial<QueryCardArgs>>;
cards?: Resolver<Array<Maybe<ResolversTypes['Card']>>, ParentType, ContextType, Partial<QueryCardsArgs>>;
greet?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
guide?: Resolver<Maybe<ResolversTypes['Guide']>, ParentType, ContextType, Partial<QueryGuideArgs>>;
guides?: Resolver<Array<Maybe<ResolversTypes['Guide']>>, ParentType, ContextType, Partial<QueryGuidesArgs>>;
};
export interface UuidScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes['UUID'], any> {
name: 'UUID';
}
export type Resolvers<ContextType = any> = {
Card?: CardResolvers<ContextType>;
CardAditionalObjective?: CardAditionalObjectiveResolvers<ContextType>;
CardContent?: CardContentResolvers<ContextType>;
CardKeyObjective?: CardKeyObjectiveResolvers<ContextType>;
Guide?: GuideResolvers<ContextType>;
GuideCard?: GuideCardResolvers<ContextType>;
GuideCollaboration?: GuideCollaborationResolvers<ContextType>;
GuideExpertise?: GuideExpertiseResolvers<ContextType>;
GuideFAQ?: GuideFaqResolvers<ContextType>;
Mutation?: MutationResolvers<ContextType>;
Query?: QueryResolvers<ContextType>;
UUID?: GraphQLScalarType;
};