|
1 | 1 | import Maybe from '../tsutils/Maybe';
|
2 |
| -import { |
3 |
| - DocumentNode, |
4 |
| - Location, |
5 |
| - StringValueNode, |
6 |
| - TypeDefinitionNode, |
7 |
| - NamedTypeNode, |
8 |
| - DirectiveDefinitionNode, |
9 |
| - FieldDefinitionNode, |
10 |
| - InputValueDefinitionNode, |
11 |
| - EnumValueDefinitionNode, |
12 |
| - TypeNode, |
13 |
| -} from '../language/ast'; |
14 |
| -import { |
15 |
| - GraphQLNamedType, |
16 |
| - GraphQLFieldConfig, |
17 |
| - GraphQLInputField, |
18 |
| - GraphQLEnumValueConfig, |
19 |
| - GraphQLType, |
20 |
| - GraphQLArgumentConfig, |
21 |
| - GraphQLInputFieldConfig, |
22 |
| -} from '../type/definition'; |
23 |
| -import { GraphQLDirective } from '../type/directives'; |
| 2 | +import { DocumentNode } from '../language/ast'; |
24 | 3 | import { Source } from '../language/source';
|
25 | 4 | import { GraphQLSchema, GraphQLSchemaValidationOptions } from '../type/schema';
|
26 | 5 | import { ParseOptions } from '../language/parser';
|
27 |
| -import { dedentBlockStringValue } from '../language/blockString'; |
28 | 6 |
|
29 | 7 | interface BuildSchemaOptions extends GraphQLSchemaValidationOptions {
|
30 | 8 | /**
|
@@ -66,44 +44,6 @@ export function buildASTSchema(
|
66 | 44 | options?: BuildSchemaOptions,
|
67 | 45 | ): GraphQLSchema;
|
68 | 46 |
|
69 |
| -type TypeDefinitionsMap = { [key: string]: TypeDefinitionNode }; |
70 |
| -type TypeResolver = (typeRef: NamedTypeNode) => GraphQLNamedType; |
71 |
| - |
72 |
| -export class ASTDefinitionBuilder { |
73 |
| - constructor(options: Maybe<BuildSchemaOptions>, resolveType: TypeResolver); |
74 |
| - |
75 |
| - getNamedType(node: NamedTypeNode): GraphQLNamedType; |
76 |
| - |
77 |
| - getWrappedType(node: TypeNode): GraphQLType; |
78 |
| - |
79 |
| - buildDirective(directive: DirectiveDefinitionNode): GraphQLDirective; |
80 |
| - |
81 |
| - buildField(field: FieldDefinitionNode): GraphQLFieldConfig<any, any>; |
82 |
| - |
83 |
| - buildArg(value: InputValueDefinitionNode): GraphQLArgumentConfig; |
84 |
| - |
85 |
| - buildInputField(value: InputValueDefinitionNode): GraphQLInputFieldConfig; |
86 |
| - |
87 |
| - buildEnumValue(value: EnumValueDefinitionNode): GraphQLEnumValueConfig; |
88 |
| - |
89 |
| - buildType(node: NamedTypeNode | TypeDefinitionNode): GraphQLNamedType; |
90 |
| -} |
91 |
| - |
92 |
| -/** |
93 |
| - * Given an ast node, returns its string description. |
94 |
| - * @deprecated: provided to ease adoption and will be removed in v16. |
95 |
| - * |
96 |
| - * Accepts options as a second argument: |
97 |
| - * |
98 |
| - * - commentDescriptions: |
99 |
| - * Provide true to use preceding comments as the description. |
100 |
| - * |
101 |
| - */ |
102 |
| -export function getDescription( |
103 |
| - node: { readonly description?: StringValueNode; readonly loc?: Location }, |
104 |
| - options: Maybe<BuildSchemaOptions>, |
105 |
| -): string | undefined; |
106 |
| - |
107 | 47 | /**
|
108 | 48 | * A helper function to build a GraphQLSchema directly from a source
|
109 | 49 | * document.
|
|
0 commit comments