1 | import type { Maybe } from '../jsutils/Maybe';
|
2 | import type { ASTNode, FieldNode } from '../language/ast';
|
3 | import type { ASTVisitor } from '../language/visitor';
|
4 | import type {
|
5 | GraphQLArgument,
|
6 | GraphQLCompositeType,
|
7 | GraphQLEnumValue,
|
8 | GraphQLField,
|
9 | GraphQLInputType,
|
10 | GraphQLOutputType,
|
11 | GraphQLType,
|
12 | } from '../type/definition';
|
13 | import type { GraphQLDirective } from '../type/directives';
|
14 | import type { GraphQLSchema } from '../type/schema';
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | export declare class TypeInfo {
|
21 | private _schema;
|
22 | private _typeStack;
|
23 | private _parentTypeStack;
|
24 | private _inputTypeStack;
|
25 | private _fieldDefStack;
|
26 | private _defaultValueStack;
|
27 | private _directive;
|
28 | private _argument;
|
29 | private _enumValue;
|
30 | private _getFieldDef;
|
31 | constructor(
|
32 | schema: GraphQLSchema,
|
33 | |
34 |
|
35 |
|
36 |
|
37 | initialType?: Maybe<GraphQLType>,
|
38 |
|
39 | getFieldDefFn?: GetFieldDefFn,
|
40 | );
|
41 | get [Symbol.toStringTag](): string;
|
42 | getType(): Maybe<GraphQLOutputType>;
|
43 | getParentType(): Maybe<GraphQLCompositeType>;
|
44 | getInputType(): Maybe<GraphQLInputType>;
|
45 | getParentInputType(): Maybe<GraphQLInputType>;
|
46 | getFieldDef(): Maybe<GraphQLField<unknown, unknown>>;
|
47 | getDefaultValue(): Maybe<unknown>;
|
48 | getDirective(): Maybe<GraphQLDirective>;
|
49 | getArgument(): Maybe<GraphQLArgument>;
|
50 | getEnumValue(): Maybe<GraphQLEnumValue>;
|
51 | enter(node: ASTNode): void;
|
52 | leave(node: ASTNode): void;
|
53 | }
|
54 | declare type GetFieldDefFn = (
|
55 | schema: GraphQLSchema,
|
56 | parentType: GraphQLType,
|
57 | fieldNode: FieldNode,
|
58 | ) => Maybe<GraphQLField<unknown, unknown>>;
|
59 | /**
|
60 | * Creates a new visitor instance which maintains a provided TypeInfo instance
|
61 | * along with visiting visitor.
|
62 | */
|
63 | export declare function visitWithTypeInfo(
|
64 | typeInfo: TypeInfo,
|
65 | visitor: ASTVisitor,
|
66 | ): ASTVisitor;
|
67 | export {};
|