1 | import { GraphQLEnumType, GraphQLInputObjectType, GraphQLNamedType, GraphQLScalarType, visit } from 'graphql';
|
2 | export interface SchemaPrintOptions {
|
3 | |
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | commentDescriptions?: boolean;
|
12 | assumeValid?: boolean;
|
13 | }
|
14 | export interface GetDocumentNodeFromSchemaOptions {
|
15 | pathToDirectivesInExtensions?: Array<string>;
|
16 | }
|
17 | export type PrintSchemaWithDirectivesOptions = SchemaPrintOptions & GetDocumentNodeFromSchemaOptions;
|
18 | export type Maybe<T> = null | undefined | T;
|
19 | export type Constructor<T> = new (...args: any[]) => T;
|
20 | export type PruneSchemaFilter = (type: GraphQLNamedType) => boolean;
|
21 |
|
22 |
|
23 |
|
24 | export interface PruneSchemaOptions {
|
25 | |
26 |
|
27 |
|
28 |
|
29 | skipPruning?: PruneSchemaFilter;
|
30 | |
31 |
|
32 |
|
33 | skipEmptyCompositeTypePruning?: boolean;
|
34 | |
35 |
|
36 |
|
37 |
|
38 | skipUnimplementedInterfacesPruning?: boolean;
|
39 | |
40 |
|
41 |
|
42 | skipEmptyUnionPruning?: boolean;
|
43 | |
44 |
|
45 |
|
46 | skipUnusedTypesPruning?: boolean;
|
47 | }
|
48 | export type InputLeafValueTransformer = (type: GraphQLEnumType | GraphQLScalarType, originalValue: any) => any;
|
49 | export type InputObjectValueTransformer = (type: GraphQLInputObjectType, originalValue: Record<string, any>) => Record<string, any>;
|
50 | export type ASTVisitorKeyMap = Partial<Parameters<typeof visit>[2]>;
|
51 | export type DirectiveLocationEnum = typeof DirectiveLocation;
|
52 | export declare enum DirectiveLocation {
|
53 |
|
54 | QUERY = "QUERY",
|
55 | MUTATION = "MUTATION",
|
56 | SUBSCRIPTION = "SUBSCRIPTION",
|
57 | FIELD = "FIELD",
|
58 | FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION",
|
59 | FRAGMENT_SPREAD = "FRAGMENT_SPREAD",
|
60 | INLINE_FRAGMENT = "INLINE_FRAGMENT",
|
61 | VARIABLE_DEFINITION = "VARIABLE_DEFINITION",
|
62 |
|
63 | SCHEMA = "SCHEMA",
|
64 | SCALAR = "SCALAR",
|
65 | OBJECT = "OBJECT",
|
66 | FIELD_DEFINITION = "FIELD_DEFINITION",
|
67 | ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION",
|
68 | INTERFACE = "INTERFACE",
|
69 | UNION = "UNION",
|
70 | ENUM = "ENUM",
|
71 | ENUM_VALUE = "ENUM_VALUE",
|
72 | INPUT_OBJECT = "INPUT_OBJECT",
|
73 | INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION"
|
74 | }
|
75 | export type ExtensionsObject = Record<string, any>;
|
76 | export type ObjectTypeExtensions = {
|
77 | type: 'object';
|
78 | fields: Record<string, {
|
79 | extensions: ExtensionsObject;
|
80 | arguments: Record<string, ExtensionsObject>;
|
81 | }>;
|
82 | };
|
83 | export type InputTypeExtensions = {
|
84 | type: 'input';
|
85 | fields: Record<string, {
|
86 | extensions: ExtensionsObject;
|
87 | }>;
|
88 | };
|
89 | export type InterfaceTypeExtensions = {
|
90 | type: 'interface';
|
91 | fields: Record<string, {
|
92 | extensions: ExtensionsObject;
|
93 | arguments: Record<string, ExtensionsObject>;
|
94 | }>;
|
95 | };
|
96 | export type UnionTypeExtensions = {
|
97 | type: 'union';
|
98 | };
|
99 | export type ScalarTypeExtensions = {
|
100 | type: 'scalar';
|
101 | };
|
102 | export type EnumTypeExtensions = {
|
103 | type: 'enum';
|
104 | values: Record<string, ExtensionsObject>;
|
105 | };
|
106 | export type PossibleTypeExtensions = InputTypeExtensions | InterfaceTypeExtensions | ObjectTypeExtensions | UnionTypeExtensions | ScalarTypeExtensions | EnumTypeExtensions;
|
107 | export type SchemaExtensions = {
|
108 | schemaExtensions: ExtensionsObject;
|
109 | types: Record<string, {
|
110 | extensions: ExtensionsObject;
|
111 | } & PossibleTypeExtensions>;
|
112 | };
|
113 | export type DirectiveArgs = {
|
114 | [name: string]: any;
|
115 | };
|
116 | export type DirectiveUsage = {
|
117 | name: string;
|
118 | args: DirectiveArgs;
|
119 | };
|