1 | import Maybe from '../tsutils/Maybe';
|
2 | import { ASTNode, FieldNode } from '../language/ast';
|
3 | import { GraphQLSchema } from '../type/schema';
|
4 | import { GraphQLDirective } from '../type/directives';
|
5 | import {
|
6 | GraphQLType,
|
7 | GraphQLInputType,
|
8 | GraphQLOutputType,
|
9 | GraphQLCompositeType,
|
10 | GraphQLField,
|
11 | GraphQLArgument,
|
12 | GraphQLEnumValue,
|
13 | } from '../type/definition';
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | export class TypeInfo {
|
21 | constructor(
|
22 | schema: GraphQLSchema,
|
23 |
|
24 |
|
25 |
|
26 | getFieldDefFn?: getFieldDef,
|
27 |
|
28 |
|
29 | initialType?: GraphQLType,
|
30 | );
|
31 |
|
32 | getType(): Maybe<GraphQLOutputType>;
|
33 | getParentType(): Maybe<GraphQLCompositeType>;
|
34 | getInputType(): Maybe<GraphQLInputType>;
|
35 | getParentInputType(): Maybe<GraphQLInputType>;
|
36 | getFieldDef(): GraphQLField<any, Maybe<any>>;
|
37 | getDefaultValue(): Maybe<any>;
|
38 | getDirective(): Maybe<GraphQLDirective>;
|
39 | getArgument(): Maybe<GraphQLArgument>;
|
40 | getEnumValue(): Maybe<GraphQLEnumValue>;
|
41 | enter(node: ASTNode): any;
|
42 | leave(node: ASTNode): any;
|
43 | }
|
44 |
|
45 | type getFieldDef = (
|
46 | schema: GraphQLSchema,
|
47 | parentType: GraphQLType,
|
48 | fieldNode: FieldNode,
|
49 | ) => Maybe<GraphQLField<any, any>>;
|