1 | import type { Maybe } from '../jsutils/Maybe';
|
2 | import type { ObjMap } from '../jsutils/ObjMap';
|
3 | import type { Path } from '../jsutils/Path';
|
4 | import type { PromiseOrValue } from '../jsutils/PromiseOrValue';
|
5 | import type {
|
6 | EnumTypeDefinitionNode,
|
7 | EnumTypeExtensionNode,
|
8 | EnumValueDefinitionNode,
|
9 | FieldDefinitionNode,
|
10 | FieldNode,
|
11 | FragmentDefinitionNode,
|
12 | InputObjectTypeDefinitionNode,
|
13 | InputObjectTypeExtensionNode,
|
14 | InputValueDefinitionNode,
|
15 | InterfaceTypeDefinitionNode,
|
16 | InterfaceTypeExtensionNode,
|
17 | ObjectTypeDefinitionNode,
|
18 | ObjectTypeExtensionNode,
|
19 | OperationDefinitionNode,
|
20 | ScalarTypeDefinitionNode,
|
21 | ScalarTypeExtensionNode,
|
22 | UnionTypeDefinitionNode,
|
23 | UnionTypeExtensionNode,
|
24 | ValueNode,
|
25 | } from '../language/ast';
|
26 | import type { GraphQLSchema } from './schema';
|
27 |
|
28 |
|
29 |
|
30 | export declare type GraphQLType =
|
31 | | GraphQLScalarType
|
32 | | GraphQLObjectType
|
33 | | GraphQLInterfaceType
|
34 | | GraphQLUnionType
|
35 | | GraphQLEnumType
|
36 | | GraphQLInputObjectType
|
37 | | GraphQLList<GraphQLType>
|
38 | | GraphQLNonNull<
|
39 | | GraphQLScalarType
|
40 | | GraphQLObjectType
|
41 | | GraphQLInterfaceType
|
42 | | GraphQLUnionType
|
43 | | GraphQLEnumType
|
44 | | GraphQLInputObjectType
|
45 | | GraphQLList<GraphQLType>
|
46 | >;
|
47 | export declare function isType(type: unknown): type is GraphQLType;
|
48 | export declare function assertType(type: unknown): GraphQLType;
|
49 |
|
50 |
|
51 |
|
52 | export declare function isScalarType(type: unknown): type is GraphQLScalarType;
|
53 | export declare function assertScalarType(type: unknown): GraphQLScalarType;
|
54 | export declare function isObjectType(type: unknown): type is GraphQLObjectType;
|
55 | export declare function assertObjectType(type: unknown): GraphQLObjectType;
|
56 | export declare function isInterfaceType(
|
57 | type: unknown,
|
58 | ): type is GraphQLInterfaceType;
|
59 | export declare function assertInterfaceType(
|
60 | type: unknown,
|
61 | ): GraphQLInterfaceType;
|
62 | export declare function isUnionType(type: unknown): type is GraphQLUnionType;
|
63 | export declare function assertUnionType(type: unknown): GraphQLUnionType;
|
64 | export declare function isEnumType(type: unknown): type is GraphQLEnumType;
|
65 | export declare function assertEnumType(type: unknown): GraphQLEnumType;
|
66 | export declare function isInputObjectType(
|
67 | type: unknown,
|
68 | ): type is GraphQLInputObjectType;
|
69 | export declare function assertInputObjectType(
|
70 | type: unknown,
|
71 | ): GraphQLInputObjectType;
|
72 | export declare function isListType(
|
73 | type: GraphQLInputType,
|
74 | ): type is GraphQLList<GraphQLInputType>;
|
75 | export declare function isListType(
|
76 | type: GraphQLOutputType,
|
77 | ): type is GraphQLList<GraphQLOutputType>;
|
78 | export declare function isListType(
|
79 | type: unknown,
|
80 | ): type is GraphQLList<GraphQLType>;
|
81 | export declare function assertListType(type: unknown): GraphQLList<GraphQLType>;
|
82 | export declare function isNonNullType(
|
83 | type: GraphQLInputType,
|
84 | ): type is GraphQLNonNull<GraphQLInputType>;
|
85 | export declare function isNonNullType(
|
86 | type: GraphQLOutputType,
|
87 | ): type is GraphQLNonNull<GraphQLOutputType>;
|
88 | export declare function isNonNullType(
|
89 | type: unknown,
|
90 | ): type is GraphQLNonNull<GraphQLType>;
|
91 | export declare function assertNonNullType(
|
92 | type: unknown,
|
93 | ): GraphQLNonNull<GraphQLType>;
|
94 |
|
95 |
|
96 |
|
97 | export declare type GraphQLInputType =
|
98 | | GraphQLScalarType
|
99 | | GraphQLEnumType
|
100 | | GraphQLInputObjectType
|
101 | | GraphQLList<GraphQLInputType>
|
102 | | GraphQLNonNull<
|
103 | | GraphQLScalarType
|
104 | | GraphQLEnumType
|
105 | | GraphQLInputObjectType
|
106 | | GraphQLList<GraphQLInputType>
|
107 | >;
|
108 | export declare function isInputType(type: unknown): type is GraphQLInputType;
|
109 | export declare function assertInputType(type: unknown): GraphQLInputType;
|
110 |
|
111 |
|
112 |
|
113 | export declare type GraphQLOutputType =
|
114 | | GraphQLScalarType
|
115 | | GraphQLObjectType
|
116 | | GraphQLInterfaceType
|
117 | | GraphQLUnionType
|
118 | | GraphQLEnumType
|
119 | | GraphQLList<GraphQLOutputType>
|
120 | | GraphQLNonNull<
|
121 | | GraphQLScalarType
|
122 | | GraphQLObjectType
|
123 | | GraphQLInterfaceType
|
124 | | GraphQLUnionType
|
125 | | GraphQLEnumType
|
126 | | GraphQLList<GraphQLOutputType>
|
127 | >;
|
128 | export declare function isOutputType(type: unknown): type is GraphQLOutputType;
|
129 | export declare function assertOutputType(type: unknown): GraphQLOutputType;
|
130 |
|
131 |
|
132 |
|
133 | export declare type GraphQLLeafType = GraphQLScalarType | GraphQLEnumType;
|
134 | export declare function isLeafType(type: unknown): type is GraphQLLeafType;
|
135 | export declare function assertLeafType(type: unknown): GraphQLLeafType;
|
136 |
|
137 |
|
138 |
|
139 | export declare type GraphQLCompositeType =
|
140 | | GraphQLObjectType
|
141 | | GraphQLInterfaceType
|
142 | | GraphQLUnionType;
|
143 | export declare function isCompositeType(
|
144 | type: unknown,
|
145 | ): type is GraphQLCompositeType;
|
146 | export declare function assertCompositeType(
|
147 | type: unknown,
|
148 | ): GraphQLCompositeType;
|
149 |
|
150 |
|
151 |
|
152 | export declare type GraphQLAbstractType =
|
153 | | GraphQLInterfaceType
|
154 | | GraphQLUnionType;
|
155 | export declare function isAbstractType(
|
156 | type: unknown,
|
157 | ): type is GraphQLAbstractType;
|
158 | export declare function assertAbstractType(type: unknown): GraphQLAbstractType;
|
159 |
|
160 |
|
161 |
|
162 |
|
163 |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 |
|
169 |
|
170 |
|
171 |
|
172 |
|
173 |
|
174 |
|
175 |
|
176 |
|
177 |
|
178 | export declare class GraphQLList<T extends GraphQLType> {
|
179 | readonly ofType: T;
|
180 | constructor(ofType: T);
|
181 | get [Symbol.toStringTag](): string;
|
182 | toString(): string;
|
183 | toJSON(): string;
|
184 | }
|
185 | /**
|
186 | * Non-Null Type Wrapper
|
187 | *
|
188 | * A non-null is a wrapping type which points to another type.
|
189 | * Non-null types enforce that their values are never null and can ensure
|
190 | * an error is raised if this ever occurs during a request. It is useful for
|
191 | * fields which you can make a strong guarantee on non-nullability, for example
|
192 | * usually the id field of a database row will never be null.
|
193 | *
|
194 | * Example:
|
195 | *
|
196 | * ```ts
|
197 | * const RowType = new GraphQLObjectType({
|
198 | * name: 'Row',
|
199 | * fields: () => ({
|
200 | * id: { type: new GraphQLNonNull(GraphQLString) },
|
201 | * })
|
202 | * })
|
203 | * ```
|
204 | * Note: the enforcement of non-nullability occurs within the executor.
|
205 | */
|
206 | export declare class GraphQLNonNull<T extends GraphQLNullableType> {
|
207 | readonly ofType: T;
|
208 | constructor(ofType: T);
|
209 | get [Symbol.toStringTag](): string;
|
210 | toString(): string;
|
211 | toJSON(): string;
|
212 | }
|
213 | /**
|
214 | * These types wrap and modify other types
|
215 | */
|
216 | export declare type GraphQLWrappingType =
|
217 | | GraphQLList<GraphQLType>
|
218 | | GraphQLNonNull<GraphQLType>;
|
219 | export declare function isWrappingType(
|
220 | type: unknown,
|
221 | ): type is GraphQLWrappingType;
|
222 | export declare function assertWrappingType(type: unknown): GraphQLWrappingType;
|
223 | /**
|
224 | * These types can all accept null as a value.
|
225 | */
|
226 | export declare type GraphQLNullableType =
|
227 | | GraphQLScalarType
|
228 | | GraphQLObjectType
|
229 | | GraphQLInterfaceType
|
230 | | GraphQLUnionType
|
231 | | GraphQLEnumType
|
232 | | GraphQLInputObjectType
|
233 | | GraphQLList<GraphQLType>;
|
234 | export declare function isNullableType(
|
235 | type: unknown,
|
236 | ): type is GraphQLNullableType;
|
237 | export declare function assertNullableType(type: unknown): GraphQLNullableType;
|
238 | export declare function getNullableType(type: undefined | null): void;
|
239 | export declare function getNullableType<T extends GraphQLNullableType>(
|
240 | type: T | GraphQLNonNull<T>,
|
241 | ): T;
|
242 | export declare function getNullableType(
|
243 | type: Maybe<GraphQLType>,
|
244 | ): GraphQLNullableType | undefined;
|
245 | /**
|
246 | * These named types do not include modifiers like List or NonNull.
|
247 | */
|
248 | export declare type GraphQLNamedType =
|
249 | | GraphQLNamedInputType
|
250 | | GraphQLNamedOutputType;
|
251 | export declare type GraphQLNamedInputType =
|
252 | | GraphQLScalarType
|
253 | | GraphQLEnumType
|
254 | | GraphQLInputObjectType;
|
255 | export declare type GraphQLNamedOutputType =
|
256 | | GraphQLScalarType
|
257 | | GraphQLObjectType
|
258 | | GraphQLInterfaceType
|
259 | | GraphQLUnionType
|
260 | | GraphQLEnumType;
|
261 | export declare function isNamedType(type: unknown): type is GraphQLNamedType;
|
262 | export declare function assertNamedType(type: unknown): GraphQLNamedType;
|
263 | export declare function getNamedType(type: undefined | null): void;
|
264 | export declare function getNamedType(
|
265 | type: GraphQLInputType,
|
266 | ): GraphQLNamedInputType;
|
267 | export declare function getNamedType(
|
268 | type: GraphQLOutputType,
|
269 | ): GraphQLNamedOutputType;
|
270 | export declare function getNamedType(type: GraphQLType): GraphQLNamedType;
|
271 | export declare function getNamedType(
|
272 | type: Maybe<GraphQLType>,
|
273 | ): GraphQLNamedType | undefined;
|
274 | /**
|
275 | * Used while defining GraphQL types to allow for circular references in
|
276 | * otherwise immutable type definitions.
|
277 | */
|
278 | export declare type ThunkReadonlyArray<T> =
|
279 | | (() => ReadonlyArray<T>)
|
280 | | ReadonlyArray<T>;
|
281 | export declare type ThunkObjMap<T> = (() => ObjMap<T>) | ObjMap<T>;
|
282 | export declare function resolveReadonlyArrayThunk<T>(
|
283 | thunk: ThunkReadonlyArray<T>,
|
284 | ): ReadonlyArray<T>;
|
285 | export declare function resolveObjMapThunk<T>(thunk: ThunkObjMap<T>): ObjMap<T>;
|
286 | /**
|
287 | * Custom extensions
|
288 | *
|
289 | * @remarks
|
290 | * Use a unique identifier name for your extension, for example the name of
|
291 | * your library or project. Do not use a shortened identifier as this increases
|
292 | * the risk of conflicts. We recommend you add at most one extension field,
|
293 | * an object which can contain all the values you need.
|
294 | */
|
295 | export interface GraphQLScalarTypeExtensions {
|
296 | [attributeName: string]: unknown;
|
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 | export declare class GraphQLScalarType<
|
330 | TInternal = unknown,
|
331 | TExternal = TInternal,
|
332 | > {
|
333 | name: string;
|
334 | description: Maybe<string>;
|
335 | specifiedByURL: Maybe<string>;
|
336 | serialize: GraphQLScalarSerializer<TExternal>;
|
337 | parseValue: GraphQLScalarValueParser<TInternal>;
|
338 | parseLiteral: GraphQLScalarLiteralParser<TInternal>;
|
339 | extensions: Readonly<GraphQLScalarTypeExtensions>;
|
340 | astNode: Maybe<ScalarTypeDefinitionNode>;
|
341 | extensionASTNodes: ReadonlyArray<ScalarTypeExtensionNode>;
|
342 | constructor(config: Readonly<GraphQLScalarTypeConfig<TInternal, TExternal>>);
|
343 | get [Symbol.toStringTag](): string;
|
344 | toConfig(): GraphQLScalarTypeNormalizedConfig<TInternal, TExternal>;
|
345 | toString(): string;
|
346 | toJSON(): string;
|
347 | }
|
348 | export declare type GraphQLScalarSerializer<TExternal> = (
|
349 | outputValue: unknown,
|
350 | ) => TExternal;
|
351 | export declare type GraphQLScalarValueParser<TInternal> = (
|
352 | inputValue: unknown,
|
353 | ) => TInternal;
|
354 | export declare type GraphQLScalarLiteralParser<TInternal> = (
|
355 | valueNode: ValueNode,
|
356 | variables?: Maybe<ObjMap<unknown>>,
|
357 | ) => TInternal;
|
358 | export interface GraphQLScalarTypeConfig<TInternal, TExternal> {
|
359 | name: string;
|
360 | description?: Maybe<string>;
|
361 | specifiedByURL?: Maybe<string>;
|
362 |
|
363 | serialize?: GraphQLScalarSerializer<TExternal>;
|
364 |
|
365 | parseValue?: GraphQLScalarValueParser<TInternal>;
|
366 |
|
367 | parseLiteral?: GraphQLScalarLiteralParser<TInternal>;
|
368 | extensions?: Maybe<Readonly<GraphQLScalarTypeExtensions>>;
|
369 | astNode?: Maybe<ScalarTypeDefinitionNode>;
|
370 | extensionASTNodes?: Maybe<ReadonlyArray<ScalarTypeExtensionNode>>;
|
371 | }
|
372 | interface GraphQLScalarTypeNormalizedConfig<TInternal, TExternal>
|
373 | extends GraphQLScalarTypeConfig<TInternal, TExternal> {
|
374 | serialize: GraphQLScalarSerializer<TExternal>;
|
375 | parseValue: GraphQLScalarValueParser<TInternal>;
|
376 | parseLiteral: GraphQLScalarLiteralParser<TInternal>;
|
377 | extensions: Readonly<GraphQLScalarTypeExtensions>;
|
378 | extensionASTNodes: ReadonlyArray<ScalarTypeExtensionNode>;
|
379 | }
|
380 |
|
381 |
|
382 |
|
383 |
|
384 |
|
385 |
|
386 |
|
387 |
|
388 |
|
389 |
|
390 |
|
391 |
|
392 | export interface GraphQLObjectTypeExtensions<_TSource = any, _TContext = any> {
|
393 | [attributeName: string]: unknown;
|
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 | export declare class GraphQLObjectType<TSource = any, TContext = any> {
|
436 | name: string;
|
437 | description: Maybe<string>;
|
438 | isTypeOf: Maybe<GraphQLIsTypeOfFn<TSource, TContext>>;
|
439 | extensions: Readonly<GraphQLObjectTypeExtensions<TSource, TContext>>;
|
440 | astNode: Maybe<ObjectTypeDefinitionNode>;
|
441 | extensionASTNodes: ReadonlyArray<ObjectTypeExtensionNode>;
|
442 | private _fields;
|
443 | private _interfaces;
|
444 | constructor(config: Readonly<GraphQLObjectTypeConfig<TSource, TContext>>);
|
445 | get [Symbol.toStringTag](): string;
|
446 | getFields(): GraphQLFieldMap<TSource, TContext>;
|
447 | getInterfaces(): ReadonlyArray<GraphQLInterfaceType>;
|
448 | toConfig(): GraphQLObjectTypeNormalizedConfig<TSource, TContext>;
|
449 | toString(): string;
|
450 | toJSON(): string;
|
451 | }
|
452 | export declare function defineArguments(
|
453 | config: GraphQLFieldConfigArgumentMap,
|
454 | ): ReadonlyArray<GraphQLArgument>;
|
455 | /**
|
456 | * @internal
|
457 | */
|
458 | export declare function argsToArgsConfig(
|
459 | args: ReadonlyArray<GraphQLArgument>,
|
460 | ): GraphQLFieldConfigArgumentMap;
|
461 | export interface GraphQLObjectTypeConfig<TSource, TContext> {
|
462 | name: string;
|
463 | description?: Maybe<string>;
|
464 | interfaces?: ThunkReadonlyArray<GraphQLInterfaceType>;
|
465 | fields: ThunkObjMap<GraphQLFieldConfig<TSource, TContext>>;
|
466 | isTypeOf?: Maybe<GraphQLIsTypeOfFn<TSource, TContext>>;
|
467 | extensions?: Maybe<Readonly<GraphQLObjectTypeExtensions<TSource, TContext>>>;
|
468 | astNode?: Maybe<ObjectTypeDefinitionNode>;
|
469 | extensionASTNodes?: Maybe<ReadonlyArray<ObjectTypeExtensionNode>>;
|
470 | }
|
471 | interface GraphQLObjectTypeNormalizedConfig<TSource, TContext>
|
472 | extends GraphQLObjectTypeConfig<any, any> {
|
473 | interfaces: ReadonlyArray<GraphQLInterfaceType>;
|
474 | fields: GraphQLFieldConfigMap<any, any>;
|
475 | extensions: Readonly<GraphQLObjectTypeExtensions<TSource, TContext>>;
|
476 | extensionASTNodes: ReadonlyArray<ObjectTypeExtensionNode>;
|
477 | }
|
478 | export declare type GraphQLTypeResolver<TSource, TContext> = (
|
479 | value: TSource,
|
480 | context: TContext,
|
481 | info: GraphQLResolveInfo,
|
482 | abstractType: GraphQLAbstractType,
|
483 | ) => PromiseOrValue<string | undefined>;
|
484 | export declare type GraphQLIsTypeOfFn<TSource, TContext> = (
|
485 | source: TSource,
|
486 | context: TContext,
|
487 | info: GraphQLResolveInfo,
|
488 | ) => PromiseOrValue<boolean>;
|
489 | export declare type GraphQLFieldResolver<
|
490 | TSource,
|
491 | TContext,
|
492 | TArgs = any,
|
493 | TResult = unknown,
|
494 | > = (
|
495 | source: TSource,
|
496 | args: TArgs,
|
497 | context: TContext,
|
498 | info: GraphQLResolveInfo,
|
499 | ) => TResult;
|
500 | export interface GraphQLResolveInfo {
|
501 | readonly fieldName: string;
|
502 | readonly fieldNodes: ReadonlyArray<FieldNode>;
|
503 | readonly returnType: GraphQLOutputType;
|
504 | readonly parentType: GraphQLObjectType;
|
505 | readonly path: Path;
|
506 | readonly schema: GraphQLSchema;
|
507 | readonly fragments: ObjMap<FragmentDefinitionNode>;
|
508 | readonly rootValue: unknown;
|
509 | readonly operation: OperationDefinitionNode;
|
510 | readonly variableValues: {
|
511 | [variable: string]: unknown;
|
512 | };
|
513 | }
|
514 |
|
515 |
|
516 |
|
517 |
|
518 |
|
519 |
|
520 |
|
521 |
|
522 |
|
523 |
|
524 |
|
525 |
|
526 | export interface GraphQLFieldExtensions<_TSource, _TContext, _TArgs = any> {
|
527 | [attributeName: string]: unknown;
|
528 | }
|
529 | export interface GraphQLFieldConfig<TSource, TContext, TArgs = any> {
|
530 | description?: Maybe<string>;
|
531 | type: GraphQLOutputType;
|
532 | args?: GraphQLFieldConfigArgumentMap;
|
533 | resolve?: GraphQLFieldResolver<TSource, TContext, TArgs>;
|
534 | subscribe?: GraphQLFieldResolver<TSource, TContext, TArgs>;
|
535 | deprecationReason?: Maybe<string>;
|
536 | extensions?: Maybe<
|
537 | Readonly<GraphQLFieldExtensions<TSource, TContext, TArgs>>
|
538 | >;
|
539 | astNode?: Maybe<FieldDefinitionNode>;
|
540 | }
|
541 | export declare type GraphQLFieldConfigArgumentMap =
|
542 | ObjMap<GraphQLArgumentConfig>;
|
543 |
|
544 |
|
545 |
|
546 |
|
547 |
|
548 |
|
549 |
|
550 |
|
551 |
|
552 | export interface GraphQLArgumentExtensions {
|
553 | [attributeName: string]: unknown;
|
554 | }
|
555 | export interface GraphQLArgumentConfig {
|
556 | description?: Maybe<string>;
|
557 | type: GraphQLInputType;
|
558 | defaultValue?: unknown;
|
559 | deprecationReason?: Maybe<string>;
|
560 | extensions?: Maybe<Readonly<GraphQLArgumentExtensions>>;
|
561 | astNode?: Maybe<InputValueDefinitionNode>;
|
562 | }
|
563 | export declare type GraphQLFieldConfigMap<TSource, TContext> = ObjMap<
|
564 | GraphQLFieldConfig<TSource, TContext>
|
565 | >;
|
566 | export interface GraphQLField<TSource, TContext, TArgs = any> {
|
567 | name: string;
|
568 | description: Maybe<string>;
|
569 | type: GraphQLOutputType;
|
570 | args: ReadonlyArray<GraphQLArgument>;
|
571 | resolve?: GraphQLFieldResolver<TSource, TContext, TArgs>;
|
572 | subscribe?: GraphQLFieldResolver<TSource, TContext, TArgs>;
|
573 | deprecationReason: Maybe<string>;
|
574 | extensions: Readonly<GraphQLFieldExtensions<TSource, TContext, TArgs>>;
|
575 | astNode: Maybe<FieldDefinitionNode>;
|
576 | }
|
577 | export interface GraphQLArgument {
|
578 | name: string;
|
579 | description: Maybe<string>;
|
580 | type: GraphQLInputType;
|
581 | defaultValue: unknown;
|
582 | deprecationReason: Maybe<string>;
|
583 | extensions: Readonly<GraphQLArgumentExtensions>;
|
584 | astNode: Maybe<InputValueDefinitionNode>;
|
585 | }
|
586 | export declare function isRequiredArgument(arg: GraphQLArgument): boolean;
|
587 | export declare type GraphQLFieldMap<TSource, TContext> = ObjMap<
|
588 | GraphQLField<TSource, TContext>
|
589 | >;
|
590 |
|
591 |
|
592 |
|
593 |
|
594 |
|
595 |
|
596 |
|
597 |
|
598 |
|
599 | export interface GraphQLInterfaceTypeExtensions {
|
600 | [attributeName: string]: unknown;
|
601 | }
|
602 |
|
603 |
|
604 |
|
605 |
|
606 |
|
607 |
|
608 |
|
609 |
|
610 |
|
611 |
|
612 |
|
613 |
|
614 |
|
615 |
|
616 |
|
617 |
|
618 |
|
619 |
|
620 |
|
621 | export declare class GraphQLInterfaceType {
|
622 | name: string;
|
623 | description: Maybe<string>;
|
624 | resolveType: Maybe<GraphQLTypeResolver<any, any>>;
|
625 | extensions: Readonly<GraphQLInterfaceTypeExtensions>;
|
626 | astNode: Maybe<InterfaceTypeDefinitionNode>;
|
627 | extensionASTNodes: ReadonlyArray<InterfaceTypeExtensionNode>;
|
628 | private _fields;
|
629 | private _interfaces;
|
630 | constructor(config: Readonly<GraphQLInterfaceTypeConfig<any, any>>);
|
631 | get [Symbol.toStringTag](): string;
|
632 | getFields(): GraphQLFieldMap<any, any>;
|
633 | getInterfaces(): ReadonlyArray<GraphQLInterfaceType>;
|
634 | toConfig(): GraphQLInterfaceTypeNormalizedConfig;
|
635 | toString(): string;
|
636 | toJSON(): string;
|
637 | }
|
638 | export interface GraphQLInterfaceTypeConfig<TSource, TContext> {
|
639 | name: string;
|
640 | description?: Maybe<string>;
|
641 | interfaces?: ThunkReadonlyArray<GraphQLInterfaceType>;
|
642 | fields: ThunkObjMap<GraphQLFieldConfig<TSource, TContext>>;
|
643 | |
644 |
|
645 |
|
646 |
|
647 |
|
648 | resolveType?: Maybe<GraphQLTypeResolver<TSource, TContext>>;
|
649 | extensions?: Maybe<Readonly<GraphQLInterfaceTypeExtensions>>;
|
650 | astNode?: Maybe<InterfaceTypeDefinitionNode>;
|
651 | extensionASTNodes?: Maybe<ReadonlyArray<InterfaceTypeExtensionNode>>;
|
652 | }
|
653 | export interface GraphQLInterfaceTypeNormalizedConfig
|
654 | extends GraphQLInterfaceTypeConfig<any, any> {
|
655 | interfaces: ReadonlyArray<GraphQLInterfaceType>;
|
656 | fields: GraphQLFieldConfigMap<any, any>;
|
657 | extensions: Readonly<GraphQLInterfaceTypeExtensions>;
|
658 | extensionASTNodes: ReadonlyArray<InterfaceTypeExtensionNode>;
|
659 | }
|
660 |
|
661 |
|
662 |
|
663 |
|
664 |
|
665 |
|
666 |
|
667 |
|
668 |
|
669 | export interface GraphQLUnionTypeExtensions {
|
670 | [attributeName: string]: unknown;
|
671 | }
|
672 |
|
673 |
|
674 |
|
675 |
|
676 |
|
677 |
|
678 |
|
679 |
|
680 |
|
681 |
|
682 |
|
683 |
|
684 |
|
685 |
|
686 |
|
687 |
|
688 |
|
689 |
|
690 |
|
691 |
|
692 |
|
693 |
|
694 |
|
695 |
|
696 | export declare class GraphQLUnionType {
|
697 | name: string;
|
698 | description: Maybe<string>;
|
699 | resolveType: Maybe<GraphQLTypeResolver<any, any>>;
|
700 | extensions: Readonly<GraphQLUnionTypeExtensions>;
|
701 | astNode: Maybe<UnionTypeDefinitionNode>;
|
702 | extensionASTNodes: ReadonlyArray<UnionTypeExtensionNode>;
|
703 | private _types;
|
704 | constructor(config: Readonly<GraphQLUnionTypeConfig<any, any>>);
|
705 | get [Symbol.toStringTag](): string;
|
706 | getTypes(): ReadonlyArray<GraphQLObjectType>;
|
707 | toConfig(): GraphQLUnionTypeNormalizedConfig;
|
708 | toString(): string;
|
709 | toJSON(): string;
|
710 | }
|
711 | export interface GraphQLUnionTypeConfig<TSource, TContext> {
|
712 | name: string;
|
713 | description?: Maybe<string>;
|
714 | types: ThunkReadonlyArray<GraphQLObjectType>;
|
715 | |
716 |
|
717 |
|
718 |
|
719 |
|
720 | resolveType?: Maybe<GraphQLTypeResolver<TSource, TContext>>;
|
721 | extensions?: Maybe<Readonly<GraphQLUnionTypeExtensions>>;
|
722 | astNode?: Maybe<UnionTypeDefinitionNode>;
|
723 | extensionASTNodes?: Maybe<ReadonlyArray<UnionTypeExtensionNode>>;
|
724 | }
|
725 | interface GraphQLUnionTypeNormalizedConfig
|
726 | extends GraphQLUnionTypeConfig<any, any> {
|
727 | types: ReadonlyArray<GraphQLObjectType>;
|
728 | extensions: Readonly<GraphQLUnionTypeExtensions>;
|
729 | extensionASTNodes: ReadonlyArray<UnionTypeExtensionNode>;
|
730 | }
|
731 |
|
732 |
|
733 |
|
734 |
|
735 |
|
736 |
|
737 |
|
738 |
|
739 |
|
740 | export interface GraphQLEnumTypeExtensions {
|
741 | [attributeName: string]: unknown;
|
742 | }
|
743 |
|
744 |
|
745 |
|
746 |
|
747 |
|
748 |
|
749 |
|
750 |
|
751 |
|
752 |
|
753 |
|
754 |
|
755 |
|
756 |
|
757 |
|
758 |
|
759 |
|
760 |
|
761 |
|
762 |
|
763 |
|
764 |
|
765 |
|
766 | export declare class GraphQLEnumType {
|
767 | name: string;
|
768 | description: Maybe<string>;
|
769 | extensions: Readonly<GraphQLEnumTypeExtensions>;
|
770 | astNode: Maybe<EnumTypeDefinitionNode>;
|
771 | extensionASTNodes: ReadonlyArray<EnumTypeExtensionNode>;
|
772 | private _values;
|
773 | private _valueLookup;
|
774 | private _nameLookup;
|
775 | constructor(config: Readonly<GraphQLEnumTypeConfig>);
|
776 | get [Symbol.toStringTag](): string;
|
777 | getValues(): ReadonlyArray<GraphQLEnumValue>;
|
778 | getValue(name: string): Maybe<GraphQLEnumValue>;
|
779 | serialize(outputValue: unknown): Maybe<string>;
|
780 | parseValue(inputValue: unknown): Maybe<any>;
|
781 | parseLiteral(
|
782 | valueNode: ValueNode,
|
783 | _variables: Maybe<ObjMap<unknown>>,
|
784 | ): Maybe<any>;
|
785 | toConfig(): GraphQLEnumTypeNormalizedConfig;
|
786 | toString(): string;
|
787 | toJSON(): string;
|
788 | }
|
789 | export interface GraphQLEnumTypeConfig {
|
790 | name: string;
|
791 | description?: Maybe<string>;
|
792 | values: ThunkObjMap<GraphQLEnumValueConfig>;
|
793 | extensions?: Maybe<Readonly<GraphQLEnumTypeExtensions>>;
|
794 | astNode?: Maybe<EnumTypeDefinitionNode>;
|
795 | extensionASTNodes?: Maybe<ReadonlyArray<EnumTypeExtensionNode>>;
|
796 | }
|
797 | interface GraphQLEnumTypeNormalizedConfig extends GraphQLEnumTypeConfig {
|
798 | values: ObjMap<GraphQLEnumValueConfig>;
|
799 | extensions: Readonly<GraphQLEnumTypeExtensions>;
|
800 | extensionASTNodes: ReadonlyArray<EnumTypeExtensionNode>;
|
801 | }
|
802 | export declare type GraphQLEnumValueConfigMap = ObjMap<GraphQLEnumValueConfig>;
|
803 |
|
804 |
|
805 |
|
806 |
|
807 |
|
808 |
|
809 |
|
810 |
|
811 |
|
812 | export interface GraphQLEnumValueExtensions {
|
813 | [attributeName: string]: unknown;
|
814 | }
|
815 | export interface GraphQLEnumValueConfig {
|
816 | description?: Maybe<string>;
|
817 | value?: any;
|
818 | deprecationReason?: Maybe<string>;
|
819 | extensions?: Maybe<Readonly<GraphQLEnumValueExtensions>>;
|
820 | astNode?: Maybe<EnumValueDefinitionNode>;
|
821 | }
|
822 | export interface GraphQLEnumValue {
|
823 | name: string;
|
824 | description: Maybe<string>;
|
825 | value: any;
|
826 | deprecationReason: Maybe<string>;
|
827 | extensions: Readonly<GraphQLEnumValueExtensions>;
|
828 | astNode: Maybe<EnumValueDefinitionNode>;
|
829 | }
|
830 |
|
831 |
|
832 |
|
833 |
|
834 |
|
835 |
|
836 |
|
837 |
|
838 |
|
839 | export interface GraphQLInputObjectTypeExtensions {
|
840 | [attributeName: string]: unknown;
|
841 | }
|
842 |
|
843 |
|
844 |
|
845 |
|
846 |
|
847 |
|
848 |
|
849 |
|
850 |
|
851 |
|
852 |
|
853 |
|
854 |
|
855 |
|
856 |
|
857 |
|
858 |
|
859 |
|
860 |
|
861 |
|
862 |
|
863 | export declare class GraphQLInputObjectType {
|
864 | name: string;
|
865 | description: Maybe<string>;
|
866 | extensions: Readonly<GraphQLInputObjectTypeExtensions>;
|
867 | astNode: Maybe<InputObjectTypeDefinitionNode>;
|
868 | extensionASTNodes: ReadonlyArray<InputObjectTypeExtensionNode>;
|
869 | isOneOf: boolean;
|
870 | private _fields;
|
871 | constructor(config: Readonly<GraphQLInputObjectTypeConfig>);
|
872 | get [Symbol.toStringTag](): string;
|
873 | getFields(): GraphQLInputFieldMap;
|
874 | toConfig(): GraphQLInputObjectTypeNormalizedConfig;
|
875 | toString(): string;
|
876 | toJSON(): string;
|
877 | }
|
878 | export interface GraphQLInputObjectTypeConfig {
|
879 | name: string;
|
880 | description?: Maybe<string>;
|
881 | fields: ThunkObjMap<GraphQLInputFieldConfig>;
|
882 | extensions?: Maybe<Readonly<GraphQLInputObjectTypeExtensions>>;
|
883 | astNode?: Maybe<InputObjectTypeDefinitionNode>;
|
884 | extensionASTNodes?: Maybe<ReadonlyArray<InputObjectTypeExtensionNode>>;
|
885 | isOneOf?: boolean;
|
886 | }
|
887 | interface GraphQLInputObjectTypeNormalizedConfig
|
888 | extends GraphQLInputObjectTypeConfig {
|
889 | fields: GraphQLInputFieldConfigMap;
|
890 | extensions: Readonly<GraphQLInputObjectTypeExtensions>;
|
891 | extensionASTNodes: ReadonlyArray<InputObjectTypeExtensionNode>;
|
892 | }
|
893 |
|
894 |
|
895 |
|
896 |
|
897 |
|
898 |
|
899 |
|
900 |
|
901 |
|
902 | export interface GraphQLInputFieldExtensions {
|
903 | [attributeName: string]: unknown;
|
904 | }
|
905 | export interface GraphQLInputFieldConfig {
|
906 | description?: Maybe<string>;
|
907 | type: GraphQLInputType;
|
908 | defaultValue?: unknown;
|
909 | deprecationReason?: Maybe<string>;
|
910 | extensions?: Maybe<Readonly<GraphQLInputFieldExtensions>>;
|
911 | astNode?: Maybe<InputValueDefinitionNode>;
|
912 | }
|
913 | export declare type GraphQLInputFieldConfigMap =
|
914 | ObjMap<GraphQLInputFieldConfig>;
|
915 | export interface GraphQLInputField {
|
916 | name: string;
|
917 | description: Maybe<string>;
|
918 | type: GraphQLInputType;
|
919 | defaultValue: unknown;
|
920 | deprecationReason: Maybe<string>;
|
921 | extensions: Readonly<GraphQLInputFieldExtensions>;
|
922 | astNode: Maybe<InputValueDefinitionNode>;
|
923 | }
|
924 | export declare function isRequiredInputField(field: GraphQLInputField): boolean;
|
925 | export declare type GraphQLInputFieldMap = ObjMap<GraphQLInputField>;
|
926 | export {};
|