@graphql-tools/utils 8.2.2 → 8.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/implementsAbstractType.d.ts +1 -1
  2. package/index.js +10 -6
  3. package/index.mjs +11 -8
  4. package/package.json +1 -1
  5. package/validate-documents.d.ts +1 -0
  6. package/es5/AggregateError.d.ts +0 -10
  7. package/es5/Interfaces.d.ts +0 -242
  8. package/es5/addTypes.d.ts +0 -2
  9. package/es5/astFromType.d.ts +0 -2
  10. package/es5/astFromValueUntyped.d.ts +0 -17
  11. package/es5/build-operation-for-field.d.ts +0 -18
  12. package/es5/collectFields.d.ts +0 -5
  13. package/es5/comments.d.ts +0 -30
  14. package/es5/errors.d.ts +0 -2
  15. package/es5/executor.d.ts +0 -7
  16. package/es5/fields.d.ts +0 -5
  17. package/es5/filterSchema.d.ts +0 -12
  18. package/es5/fixSchemaAst.d.ts +0 -3
  19. package/es5/forEachDefaultValue.d.ts +0 -3
  20. package/es5/forEachField.d.ts +0 -3
  21. package/es5/get-directives.d.ts +0 -11
  22. package/es5/get-fields-with-directives.d.ts +0 -16
  23. package/es5/get-implementing-types.d.ts +0 -2
  24. package/es5/getArgumentValues.d.ts +0 -10
  25. package/es5/getObjectTypeFromTypeMap.d.ts +0 -3
  26. package/es5/getResolversFromSchema.d.ts +0 -3
  27. package/es5/getResponseKeyFromInfo.d.ts +0 -7
  28. package/es5/heal.d.ts +0 -3
  29. package/es5/helpers.d.ts +0 -9
  30. package/es5/implementsAbstractType.d.ts +0 -3
  31. package/es5/index.d.ts +0 -49
  32. package/es5/index.js +0 -4842
  33. package/es5/index.mjs +0 -4734
  34. package/es5/inspect.d.ts +0 -4
  35. package/es5/isAsyncIterable.d.ts +0 -1
  36. package/es5/isDocumentNode.d.ts +0 -2
  37. package/es5/loaders.d.ts +0 -18
  38. package/es5/mapAsyncIterator.d.ts +0 -5
  39. package/es5/mapSchema.d.ts +0 -7
  40. package/es5/memoize.d.ts +0 -6
  41. package/es5/mergeDeep.d.ts +0 -9
  42. package/es5/observableToAsyncIterable.d.ts +0 -12
  43. package/es5/package.json +0 -35
  44. package/es5/parse-graphql-json.d.ts +0 -4
  45. package/es5/parse-graphql-sdl.d.ts +0 -13
  46. package/es5/print-schema-with-directives.d.ts +0 -21
  47. package/es5/prune.d.ts +0 -8
  48. package/es5/renameType.d.ts +0 -8
  49. package/es5/rewire.d.ts +0 -5
  50. package/es5/rootTypes.d.ts +0 -5
  51. package/es5/selectionSets.d.ts +0 -3
  52. package/es5/stub.d.ts +0 -9
  53. package/es5/transformInputValue.d.ts +0 -6
  54. package/es5/types.d.ts +0 -49
  55. package/es5/updateArgument.d.ts +0 -3
  56. package/es5/validate-documents.d.ts +0 -9
  57. package/es5/valueMatchesCriteria.d.ts +0 -1
  58. package/es5/visitResult.d.ts +0 -15
  59. package/es5/withCancel.d.ts +0 -3
@@ -1,3 +1,3 @@
1
1
  import { GraphQLType, GraphQLSchema } from 'graphql';
2
- import { Maybe } from '@graphql-tools/utils';
2
+ import { Maybe } from './types';
3
3
  export declare function implementsAbstractType(schema: GraphQLSchema, typeA: Maybe<GraphQLType>, typeB: Maybe<GraphQLType>): boolean;
package/index.js CHANGED
@@ -1179,8 +1179,7 @@ if (typeof exports.AggregateError === 'undefined') {
1179
1179
  };
1180
1180
  }
1181
1181
 
1182
- async function validateGraphQlDocuments(schema, documentFiles, effectiveRules) {
1183
- effectiveRules = effectiveRules || createDefaultRules();
1182
+ async function validateGraphQlDocuments(schema, documentFiles, effectiveRules = createDefaultRules()) {
1184
1183
  const allFragmentMap = new Map();
1185
1184
  const documentFileObjectsToValidate = [];
1186
1185
  for (const documentFile of documentFiles) {
@@ -1242,9 +1241,11 @@ function checkValidationErrors(loadDocumentErrors) {
1242
1241
  }
1243
1242
  }
1244
1243
  function createDefaultRules() {
1245
- const ignored = ['NoUnusedFragmentsRule', 'NoUnusedVariablesRule', 'KnownDirectivesRule'];
1246
- const v4ignored = ignored.map(rule => rule.replace(/Rule$/, ''));
1247
- return graphql.specifiedRules.filter((f) => !ignored.includes(f.name) && !v4ignored.includes(f.name));
1244
+ let ignored = ['NoUnusedFragmentsRule', 'NoUnusedVariablesRule', 'KnownDirectivesRule'];
1245
+ if (graphql.versionInfo.major < 15) {
1246
+ ignored = ignored.map(rule => rule.replace(/Rule$/, ''));
1247
+ }
1248
+ return graphql.specifiedRules.filter((f) => !ignored.includes(f.name));
1248
1249
  }
1249
1250
 
1250
1251
  function stripBOM(content) {
@@ -3930,7 +3931,9 @@ function visitData(data, enter, leave) {
3930
3931
  if (newData != null) {
3931
3932
  for (const key in newData) {
3932
3933
  const value = newData[key];
3933
- newData[key] = visitData(value, enter, leave);
3934
+ Object.defineProperty(newData, key, {
3935
+ value: visitData(value, enter, leave),
3936
+ });
3934
3937
  }
3935
3938
  }
3936
3939
  return leave != null ? leave(newData) : newData;
@@ -4204,6 +4207,7 @@ exports.collectSubFields = collectSubFields;
4204
4207
  exports.compareNodes = compareNodes;
4205
4208
  exports.compareStrings = compareStrings;
4206
4209
  exports.correctASTNodes = correctASTNodes;
4210
+ exports.createDefaultRules = createDefaultRules;
4207
4211
  exports.createNamedStub = createNamedStub;
4208
4212
  exports.createStub = createStub;
4209
4213
  exports.createVariableNameGenerator = createVariableNameGenerator;
package/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { parse, isNonNullType, GraphQLError, Kind, valueFromAST, print, isObjectType, isListType, isSpecifiedDirective, astFromValue, isSpecifiedScalarType, isIntrospectionType, isInterfaceType, isUnionType, isInputObjectType, isEnumType, isScalarType, GraphQLDeprecatedDirective, specifiedRules, concatAST, validate, buildClientSchema, visit, TokenKind, Source, isTypeSystemDefinitionNode, getNamedType, GraphQLString, GraphQLNonNull, GraphQLList, GraphQLID, GraphQLBoolean, GraphQLFloat, GraphQLInt, GraphQLObjectType, GraphQLInterfaceType, GraphQLInputObjectType, GraphQLDirective, GraphQLUnionType, GraphQLEnumType, GraphQLScalarType, isNamedType, getNullableType, isLeafType, GraphQLSchema, isDirective, isCompositeType, doTypesOverlap, getDirectiveValues, GraphQLSkipDirective, GraphQLIncludeDirective, typeFromAST, isAbstractType, getOperationAST, getOperationRootType, TypeNameMetaFieldDef, buildASTSchema } from 'graphql';
1
+ import { parse, isNonNullType, GraphQLError, Kind, valueFromAST, print, isObjectType, isListType, isSpecifiedDirective, astFromValue, isSpecifiedScalarType, isIntrospectionType, isInterfaceType, isUnionType, isInputObjectType, isEnumType, isScalarType, GraphQLDeprecatedDirective, specifiedRules, concatAST, validate, versionInfo, buildClientSchema, visit, TokenKind, Source, isTypeSystemDefinitionNode, getNamedType, GraphQLString, GraphQLNonNull, GraphQLList, GraphQLID, GraphQLBoolean, GraphQLFloat, GraphQLInt, GraphQLObjectType, GraphQLInterfaceType, GraphQLInputObjectType, GraphQLDirective, GraphQLUnionType, GraphQLEnumType, GraphQLScalarType, isNamedType, getNullableType, isLeafType, GraphQLSchema, isDirective, isCompositeType, doTypesOverlap, getDirectiveValues, GraphQLSkipDirective, GraphQLIncludeDirective, typeFromAST, isAbstractType, getOperationAST, getOperationRootType, TypeNameMetaFieldDef, buildASTSchema } from 'graphql';
2
2
 
3
3
  const asArray = (fns) => (Array.isArray(fns) ? fns : fns ? [fns] : []);
4
4
  const invalidDocRegex = /\.[a-z0-9]+$/i;
@@ -1175,8 +1175,7 @@ if (typeof AggregateErrorImpl === 'undefined') {
1175
1175
  };
1176
1176
  }
1177
1177
 
1178
- async function validateGraphQlDocuments(schema, documentFiles, effectiveRules) {
1179
- effectiveRules = effectiveRules || createDefaultRules();
1178
+ async function validateGraphQlDocuments(schema, documentFiles, effectiveRules = createDefaultRules()) {
1180
1179
  const allFragmentMap = new Map();
1181
1180
  const documentFileObjectsToValidate = [];
1182
1181
  for (const documentFile of documentFiles) {
@@ -1238,9 +1237,11 @@ function checkValidationErrors(loadDocumentErrors) {
1238
1237
  }
1239
1238
  }
1240
1239
  function createDefaultRules() {
1241
- const ignored = ['NoUnusedFragmentsRule', 'NoUnusedVariablesRule', 'KnownDirectivesRule'];
1242
- const v4ignored = ignored.map(rule => rule.replace(/Rule$/, ''));
1243
- return specifiedRules.filter((f) => !ignored.includes(f.name) && !v4ignored.includes(f.name));
1240
+ let ignored = ['NoUnusedFragmentsRule', 'NoUnusedVariablesRule', 'KnownDirectivesRule'];
1241
+ if (versionInfo.major < 15) {
1242
+ ignored = ignored.map(rule => rule.replace(/Rule$/, ''));
1243
+ }
1244
+ return specifiedRules.filter((f) => !ignored.includes(f.name));
1244
1245
  }
1245
1246
 
1246
1247
  function stripBOM(content) {
@@ -3927,7 +3928,9 @@ function visitData(data, enter, leave) {
3927
3928
  if (newData != null) {
3928
3929
  for (const key in newData) {
3929
3930
  const value = newData[key];
3930
- newData[key] = visitData(value, enter, leave);
3931
+ Object.defineProperty(newData, key, {
3932
+ value: visitData(value, enter, leave),
3933
+ });
3931
3934
  }
3932
3935
  }
3933
3936
  return leave != null ? leave(newData) : newData;
@@ -4176,4 +4179,4 @@ function fixSchemaAst(schema, options) {
4176
4179
  return schema;
4177
4180
  }
4178
4181
 
4179
- export { AggregateErrorImpl as AggregateError, MapperKind, addTypes, appendObjectFields, asArray, assertSome, astFromArg, astFromDirective, astFromEnumType, astFromEnumValue, astFromField, astFromInputField, astFromInputObjectType, astFromInterfaceType, astFromObjectType, astFromScalarType, astFromSchema, astFromUnionType, astFromValueUntyped, buildOperationNodeForField, checkValidationErrors, collectComment, collectFields, collectSubFields, compareNodes, compareStrings, correctASTNodes, createNamedStub, createStub, createVariableNameGenerator, dedentBlockStringValue, filterSchema, fixSchemaAst, forEachDefaultValue, forEachField, getArgumentValues, getBlockStringIndentation, getBuiltInForStub, getComment, getDefinedRootType, getDeprecatableDirectiveNodes, getDescription, getDirective, getDirectiveInExtensions, getDirectiveNodes, getDirectives, getDirectivesInExtensions, getDocumentNodeFromSchema, getFieldsWithDirectives, getImplementingTypes, getLeadingCommentBlock, getResolversFromSchema, getResponseKeyFromInfo, getRootTypeMap, getRootTypeNames, getRootTypes, healSchema, healTypes, implementsAbstractType, inspect, isAsyncIterable, isDescribable, isDocumentNode, isDocumentString, isNamedStub, isSome, isValidPath, makeDeprecatedDirective, makeDirectiveNode, makeDirectiveNodes, mapAsyncIterator, mapSchema, memoize1, memoize2, memoize2of4, memoize3, memoize4, memoize5, mergeDeep, modifyObjectFields, nodeToString, observableToAsyncIterable, parseGraphQLJSON, parseGraphQLSDL, parseInputValue, parseInputValueLiteral, parseSelectionSet, printComment, printSchemaWithDirectives, printWithComments, pruneSchema, pushComment, relocatedError, removeObjectFields, renameType, resetComments, rewireTypes, selectObjectFields, serializeInputValue, transformCommentsToDescriptions, transformInputValue, updateArgument, validateGraphQlDocuments, valueMatchesCriteria, visitData, visitErrors, visitResult, withCancel };
4182
+ export { AggregateErrorImpl as AggregateError, MapperKind, addTypes, appendObjectFields, asArray, assertSome, astFromArg, astFromDirective, astFromEnumType, astFromEnumValue, astFromField, astFromInputField, astFromInputObjectType, astFromInterfaceType, astFromObjectType, astFromScalarType, astFromSchema, astFromUnionType, astFromValueUntyped, buildOperationNodeForField, checkValidationErrors, collectComment, collectFields, collectSubFields, compareNodes, compareStrings, correctASTNodes, createDefaultRules, createNamedStub, createStub, createVariableNameGenerator, dedentBlockStringValue, filterSchema, fixSchemaAst, forEachDefaultValue, forEachField, getArgumentValues, getBlockStringIndentation, getBuiltInForStub, getComment, getDefinedRootType, getDeprecatableDirectiveNodes, getDescription, getDirective, getDirectiveInExtensions, getDirectiveNodes, getDirectives, getDirectivesInExtensions, getDocumentNodeFromSchema, getFieldsWithDirectives, getImplementingTypes, getLeadingCommentBlock, getResolversFromSchema, getResponseKeyFromInfo, getRootTypeMap, getRootTypeNames, getRootTypes, healSchema, healTypes, implementsAbstractType, inspect, isAsyncIterable, isDescribable, isDocumentNode, isDocumentString, isNamedStub, isSome, isValidPath, makeDeprecatedDirective, makeDirectiveNode, makeDirectiveNodes, mapAsyncIterator, mapSchema, memoize1, memoize2, memoize2of4, memoize3, memoize4, memoize5, mergeDeep, modifyObjectFields, nodeToString, observableToAsyncIterable, parseGraphQLJSON, parseGraphQLSDL, parseInputValue, parseInputValueLiteral, parseSelectionSet, printComment, printSchemaWithDirectives, printWithComments, pruneSchema, pushComment, relocatedError, removeObjectFields, renameType, resetComments, rewireTypes, selectObjectFields, serializeInputValue, transformCommentsToDescriptions, transformInputValue, updateArgument, validateGraphQlDocuments, valueMatchesCriteria, visitData, visitErrors, visitResult, withCancel };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/utils",
3
- "version": "8.2.2",
3
+ "version": "8.3.0",
4
4
  "description": "Common package containing utils and types for GraphQL tools",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
@@ -7,3 +7,4 @@ export interface LoadDocumentError {
7
7
  }
8
8
  export declare function validateGraphQlDocuments(schema: GraphQLSchema, documentFiles: Source[], effectiveRules?: ValidationRule[]): Promise<ReadonlyArray<LoadDocumentError>>;
9
9
  export declare function checkValidationErrors(loadDocumentErrors: ReadonlyArray<LoadDocumentError>): void | never;
10
+ export declare function createDefaultRules(): import("graphql").ValidationRule[];
@@ -1,10 +0,0 @@
1
- interface AggregateError extends Error {
2
- errors: any[];
3
- }
4
- interface AggregateErrorConstructor {
5
- new (errors: Iterable<any>, message?: string): AggregateError;
6
- (errors: Iterable<any>, message?: string): AggregateError;
7
- readonly prototype: AggregateError;
8
- }
9
- declare let AggregateErrorImpl: AggregateErrorConstructor;
10
- export { AggregateErrorImpl as AggregateError };
@@ -1,242 +0,0 @@
1
- import { GraphQLSchema, GraphQLField, GraphQLInputType, GraphQLNamedType, GraphQLResolveInfo, GraphQLScalarType, DocumentNode, FieldNode, GraphQLEnumValue, GraphQLEnumType, GraphQLUnionType, GraphQLArgument, GraphQLInputField, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLObjectType, GraphQLDirective, FragmentDefinitionNode, SelectionNode, ExecutionResult as GraphQLExecutionResult, GraphQLOutputType, FieldDefinitionNode, GraphQLFieldConfig, GraphQLInputFieldConfig, GraphQLArgumentConfig, GraphQLEnumValueConfig, GraphQLScalarSerializer, GraphQLScalarValueParser, GraphQLScalarLiteralParser, ScalarTypeDefinitionNode, ScalarTypeExtensionNode, EnumTypeDefinitionNode, EnumTypeExtensionNode, GraphQLIsTypeOfFn, ObjectTypeDefinitionNode, ObjectTypeExtensionNode, InterfaceTypeExtensionNode, InterfaceTypeDefinitionNode, GraphQLTypeResolver, UnionTypeDefinitionNode, UnionTypeExtensionNode, InputObjectTypeExtensionNode, InputObjectTypeDefinitionNode, GraphQLType, Source, DefinitionNode, OperationTypeNode } from 'graphql';
2
- export declare type ExecutionResult<TData = Record<string, any>> = GraphQLExecutionResult & {
3
- data?: TData | null;
4
- extensions?: Record<string, any>;
5
- };
6
- export interface ExecutionRequest<TArgs extends Record<string, any> = Record<string, any>, TContext = any, TRootValue = any, TExtensions = Record<string, any>> {
7
- document: DocumentNode;
8
- operationType: OperationTypeNode;
9
- variables?: TArgs;
10
- operationName?: string;
11
- extensions?: TExtensions;
12
- rootValue?: TRootValue;
13
- context?: TContext;
14
- info?: GraphQLResolveInfo;
15
- }
16
- export interface GraphQLParseOptions {
17
- noLocation?: boolean;
18
- allowLegacySDLEmptyFields?: boolean;
19
- allowLegacySDLImplementsInterfaces?: boolean;
20
- experimentalFragmentVariables?: boolean;
21
- /**
22
- * Set to `true` in order to convert all GraphQL comments (marked with # sign) to descriptions (""")
23
- * GraphQL has built-in support for transforming descriptions to comments (with `print`), but not while
24
- * parsing. Turning the flag on will support the other way as well (`parse`)
25
- */
26
- commentDescriptions?: boolean;
27
- }
28
- export declare type ValidatorBehavior = 'error' | 'warn' | 'ignore';
29
- /**
30
- * Options for validating resolvers
31
- */
32
- export interface IResolverValidationOptions {
33
- /**
34
- * Enable to require a resolver to be defined for any field that has
35
- * arguments. Defaults to `ignore`.
36
- */
37
- requireResolversForArgs?: ValidatorBehavior;
38
- /**
39
- * Enable to require a resolver to be defined for any field which has
40
- * a return type that isn't a scalar. Defaults to `ignore`.
41
- */
42
- requireResolversForNonScalar?: ValidatorBehavior;
43
- /**
44
- * Enable to require a resolver for be defined for all fields defined
45
- * in the schema. Defaults to `ignore`.
46
- */
47
- requireResolversForAllFields?: ValidatorBehavior;
48
- /**
49
- * Enable to require a `resolveType()` for Interface and Union types.
50
- * Defaults to `ignore`.
51
- */
52
- requireResolversForResolveType?: ValidatorBehavior;
53
- /**
54
- * Enable to require all defined resolvers to match fields that
55
- * actually exist in the schema. Defaults to `error` to catch common errors.
56
- */
57
- requireResolversToMatchSchema?: ValidatorBehavior;
58
- }
59
- /**
60
- * Configuration object for adding resolvers to a schema
61
- */
62
- export interface IAddResolversToSchemaOptions {
63
- /**
64
- * The schema to which to add resolvers
65
- */
66
- schema: GraphQLSchema;
67
- /**
68
- * Object describing the field resolvers to add to the provided schema
69
- */
70
- resolvers: IResolvers;
71
- /**
72
- * Override the default field resolver provided by `graphql-js`
73
- */
74
- defaultFieldResolver?: IFieldResolver<any, any>;
75
- /**
76
- * Additional options for validating the provided resolvers
77
- */
78
- resolverValidationOptions?: IResolverValidationOptions;
79
- /**
80
- * GraphQL object types that implement interfaces will inherit any missing
81
- * resolvers from their interface types defined in the `resolvers` object
82
- */
83
- inheritResolversFromInterfaces?: boolean;
84
- /**
85
- * Set to `true` to modify the existing schema instead of creating a new one
86
- */
87
- updateResolversInPlace?: boolean;
88
- }
89
- export declare type IScalarTypeResolver = GraphQLScalarType & {
90
- __name?: string;
91
- __description?: string;
92
- __serialize?: GraphQLScalarSerializer<any>;
93
- __parseValue?: GraphQLScalarValueParser<any>;
94
- __parseLiteral?: GraphQLScalarLiteralParser<any>;
95
- __extensions?: Record<string, any>;
96
- __astNode?: ScalarTypeDefinitionNode;
97
- __extensionASTNodes?: Array<ScalarTypeExtensionNode>;
98
- };
99
- export declare type IEnumTypeResolver = Record<string, any> & {
100
- __name?: string;
101
- __description?: string;
102
- __extensions?: Record<string, any>;
103
- __astNode?: EnumTypeDefinitionNode;
104
- __extensionASTNodes?: Array<EnumTypeExtensionNode>;
105
- };
106
- export interface IFieldResolverOptions<TSource = any, TContext = any, TArgs = any> {
107
- name?: string;
108
- description?: string;
109
- type?: GraphQLOutputType;
110
- args?: Array<GraphQLArgument>;
111
- resolve?: IFieldResolver<TSource, TContext, TArgs>;
112
- subscribe?: IFieldResolver<TSource, TContext, TArgs>;
113
- isDeprecated?: boolean;
114
- deprecationReason?: string;
115
- extensions?: Record<string, any>;
116
- astNode?: FieldDefinitionNode;
117
- }
118
- export declare type FieldNodeMapper = (fieldNode: FieldNode, fragments: Record<string, FragmentDefinitionNode>, transformationContext: Record<string, any>) => SelectionNode | Array<SelectionNode>;
119
- export declare type FieldNodeMappers = Record<string, Record<string, FieldNodeMapper>>;
120
- export declare type InputFieldFilter = (typeName?: string, fieldName?: string, inputFieldConfig?: GraphQLInputFieldConfig) => boolean;
121
- export declare type FieldFilter = (typeName: string, fieldName: string, fieldConfig: GraphQLFieldConfig<any, any> | GraphQLInputFieldConfig) => boolean;
122
- export declare type ObjectFieldFilter = (typeName: string, fieldName: string, fieldConfig: GraphQLFieldConfig<any, any>) => boolean;
123
- export declare type RootFieldFilter = (operation: 'Query' | 'Mutation' | 'Subscription', rootFieldName: string, fieldConfig: GraphQLFieldConfig<any, any>) => boolean;
124
- export declare type TypeFilter = (typeName: string, type: GraphQLType) => boolean;
125
- export declare type ArgumentFilter = (typeName?: string, fieldName?: string, argName?: string, argConfig?: GraphQLArgumentConfig) => boolean;
126
- export declare type RenameTypesOptions = {
127
- renameBuiltins: boolean;
128
- renameScalars: boolean;
129
- };
130
- export declare type IFieldResolver<TSource, TContext, TArgs = Record<string, any>, TReturn = any> = (source: TSource, args: TArgs, context: TContext, info: GraphQLResolveInfo) => TReturn;
131
- export declare type TypeSource = string | Source | DocumentNode | GraphQLSchema | DefinitionNode | Array<TypeSource> | (() => TypeSource);
132
- export declare type IObjectTypeResolver<TSource = any, TContext = any, TArgs = any> = {
133
- [key: string]: IFieldResolver<TSource, TContext, TArgs> | IFieldResolverOptions<TSource, TContext>;
134
- } & {
135
- __name?: string;
136
- __description?: string;
137
- __isTypeOf?: GraphQLIsTypeOfFn<TSource, TContext>;
138
- __extensions?: Record<string, any>;
139
- __astNode?: ObjectTypeDefinitionNode;
140
- __extensionASTNodes?: ObjectTypeExtensionNode;
141
- };
142
- export declare type IInterfaceTypeResolver<TSource = any, TContext = any, TArgs = any> = {
143
- [key: string]: IFieldResolver<TSource, TContext, TArgs> | IFieldResolverOptions<TSource, TContext>;
144
- } & {
145
- __name?: string;
146
- __description?: string;
147
- __resolveType?: GraphQLTypeResolver<any, any>;
148
- __extensions?: Record<string, any>;
149
- __astNode?: InterfaceTypeDefinitionNode;
150
- __extensionASTNodes?: Array<InterfaceTypeExtensionNode>;
151
- };
152
- export declare type IUnionTypeResolver = {
153
- __name?: string;
154
- __description?: string;
155
- __resolveType?: GraphQLTypeResolver<any, any>;
156
- __extensions?: Record<string, any>;
157
- __astNode?: UnionTypeDefinitionNode;
158
- __extensionASTNodes?: Array<UnionTypeExtensionNode>;
159
- };
160
- export declare type IInputObjectTypeResolver = {
161
- __name?: string;
162
- __description?: string;
163
- __extensions?: Record<string, any>;
164
- __astNode?: InputObjectTypeDefinitionNode;
165
- __extensionASTNodes?: Array<InputObjectTypeExtensionNode>;
166
- };
167
- export declare type ISchemaLevelResolver<TSource, TContext, TArgs = Record<string, any>, TReturn = any> = IFieldResolver<TSource, TContext, TArgs, TReturn>;
168
- export declare type IResolvers<TSource = any, TContext = any, TArgs = Record<string, any>, TReturn = any> = Record<string, ISchemaLevelResolver<TSource, TContext, TArgs, TReturn> | IObjectTypeResolver<TSource, TContext> | IInterfaceTypeResolver<TSource, TContext> | IUnionTypeResolver | IScalarTypeResolver | IEnumTypeResolver | IInputObjectTypeResolver>;
169
- export declare type IFieldIteratorFn = (fieldDef: GraphQLField<any, any>, typeName: string, fieldName: string) => void;
170
- export declare type IDefaultValueIteratorFn = (type: GraphQLInputType, value: any) => void;
171
- export declare type NextResolverFn = () => Promise<any>;
172
- export declare type VisitableSchemaType = GraphQLSchema | GraphQLObjectType | GraphQLInterfaceType | GraphQLInputObjectType | GraphQLNamedType | GraphQLScalarType | GraphQLField<any, any> | GraphQLInputField | GraphQLArgument | GraphQLUnionType | GraphQLEnumType | GraphQLEnumValue;
173
- export declare enum MapperKind {
174
- TYPE = "MapperKind.TYPE",
175
- SCALAR_TYPE = "MapperKind.SCALAR_TYPE",
176
- ENUM_TYPE = "MapperKind.ENUM_TYPE",
177
- COMPOSITE_TYPE = "MapperKind.COMPOSITE_TYPE",
178
- OBJECT_TYPE = "MapperKind.OBJECT_TYPE",
179
- INPUT_OBJECT_TYPE = "MapperKind.INPUT_OBJECT_TYPE",
180
- ABSTRACT_TYPE = "MapperKind.ABSTRACT_TYPE",
181
- UNION_TYPE = "MapperKind.UNION_TYPE",
182
- INTERFACE_TYPE = "MapperKind.INTERFACE_TYPE",
183
- ROOT_OBJECT = "MapperKind.ROOT_OBJECT",
184
- QUERY = "MapperKind.QUERY",
185
- MUTATION = "MapperKind.MUTATION",
186
- SUBSCRIPTION = "MapperKind.SUBSCRIPTION",
187
- DIRECTIVE = "MapperKind.DIRECTIVE",
188
- FIELD = "MapperKind.FIELD",
189
- COMPOSITE_FIELD = "MapperKind.COMPOSITE_FIELD",
190
- OBJECT_FIELD = "MapperKind.OBJECT_FIELD",
191
- ROOT_FIELD = "MapperKind.ROOT_FIELD",
192
- QUERY_ROOT_FIELD = "MapperKind.QUERY_ROOT_FIELD",
193
- MUTATION_ROOT_FIELD = "MapperKind.MUTATION_ROOT_FIELD",
194
- SUBSCRIPTION_ROOT_FIELD = "MapperKind.SUBSCRIPTION_ROOT_FIELD",
195
- INTERFACE_FIELD = "MapperKind.INTERFACE_FIELD",
196
- INPUT_OBJECT_FIELD = "MapperKind.INPUT_OBJECT_FIELD",
197
- ARGUMENT = "MapperKind.ARGUMENT",
198
- ENUM_VALUE = "MapperKind.ENUM_VALUE"
199
- }
200
- export interface SchemaMapper {
201
- [MapperKind.TYPE]?: NamedTypeMapper;
202
- [MapperKind.SCALAR_TYPE]?: ScalarTypeMapper;
203
- [MapperKind.ENUM_TYPE]?: EnumTypeMapper;
204
- [MapperKind.COMPOSITE_TYPE]?: CompositeTypeMapper;
205
- [MapperKind.OBJECT_TYPE]?: ObjectTypeMapper;
206
- [MapperKind.INPUT_OBJECT_TYPE]?: InputObjectTypeMapper;
207
- [MapperKind.ABSTRACT_TYPE]?: AbstractTypeMapper;
208
- [MapperKind.UNION_TYPE]?: UnionTypeMapper;
209
- [MapperKind.INTERFACE_TYPE]?: InterfaceTypeMapper;
210
- [MapperKind.ROOT_OBJECT]?: ObjectTypeMapper;
211
- [MapperKind.QUERY]?: ObjectTypeMapper;
212
- [MapperKind.MUTATION]?: ObjectTypeMapper;
213
- [MapperKind.SUBSCRIPTION]?: ObjectTypeMapper;
214
- [MapperKind.ENUM_VALUE]?: EnumValueMapper;
215
- [MapperKind.FIELD]?: GenericFieldMapper<GraphQLFieldConfig<any, any> | GraphQLInputFieldConfig>;
216
- [MapperKind.OBJECT_FIELD]?: FieldMapper;
217
- [MapperKind.ROOT_FIELD]?: FieldMapper;
218
- [MapperKind.QUERY_ROOT_FIELD]?: FieldMapper;
219
- [MapperKind.MUTATION_ROOT_FIELD]?: FieldMapper;
220
- [MapperKind.SUBSCRIPTION_ROOT_FIELD]?: FieldMapper;
221
- [MapperKind.INTERFACE_FIELD]?: FieldMapper;
222
- [MapperKind.COMPOSITE_FIELD]?: FieldMapper;
223
- [MapperKind.ARGUMENT]?: ArgumentMapper;
224
- [MapperKind.INPUT_OBJECT_FIELD]?: InputFieldMapper;
225
- [MapperKind.DIRECTIVE]?: DirectiveMapper;
226
- }
227
- export declare type SchemaFieldMapperTypes = Array<MapperKind.FIELD | MapperKind.COMPOSITE_FIELD | MapperKind.OBJECT_FIELD | MapperKind.ROOT_FIELD | MapperKind.QUERY_ROOT_FIELD | MapperKind.MUTATION_ROOT_FIELD | MapperKind.SUBSCRIPTION_ROOT_FIELD | MapperKind.INTERFACE_FIELD | MapperKind.INPUT_OBJECT_FIELD>;
228
- export declare type NamedTypeMapper = (type: GraphQLNamedType, schema: GraphQLSchema) => GraphQLNamedType | null | undefined;
229
- export declare type ScalarTypeMapper = (type: GraphQLScalarType, schema: GraphQLSchema) => GraphQLScalarType | null | undefined;
230
- export declare type EnumTypeMapper = (type: GraphQLEnumType, schema: GraphQLSchema) => GraphQLEnumType | null | undefined;
231
- export declare type EnumValueMapper = (valueConfig: GraphQLEnumValueConfig, typeName: string, schema: GraphQLSchema, externalValue: string) => GraphQLEnumValueConfig | [string, GraphQLEnumValueConfig] | null | undefined;
232
- export declare type CompositeTypeMapper = (type: GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType, schema: GraphQLSchema) => GraphQLObjectType | GraphQLInterfaceType | GraphQLUnionType | null | undefined;
233
- export declare type ObjectTypeMapper = (type: GraphQLObjectType, schema: GraphQLSchema) => GraphQLObjectType | null | undefined;
234
- export declare type InputObjectTypeMapper = (type: GraphQLInputObjectType, schema: GraphQLSchema) => GraphQLInputObjectType | null | undefined;
235
- export declare type AbstractTypeMapper = (type: GraphQLInterfaceType | GraphQLUnionType, schema: GraphQLSchema) => GraphQLInterfaceType | GraphQLUnionType | null | undefined;
236
- export declare type UnionTypeMapper = (type: GraphQLUnionType, schema: GraphQLSchema) => GraphQLUnionType | null | undefined;
237
- export declare type InterfaceTypeMapper = (type: GraphQLInterfaceType, schema: GraphQLSchema) => GraphQLInterfaceType | null | undefined;
238
- export declare type DirectiveMapper = (directive: GraphQLDirective, schema: GraphQLSchema) => GraphQLDirective | null | undefined;
239
- export declare type GenericFieldMapper<F extends GraphQLFieldConfig<any, any> | GraphQLInputFieldConfig> = (fieldConfig: F, fieldName: string, typeName: string, schema: GraphQLSchema) => F | [string, F] | null | undefined;
240
- export declare type FieldMapper = GenericFieldMapper<GraphQLFieldConfig<any, any>>;
241
- export declare type ArgumentMapper = (argumentConfig: GraphQLArgumentConfig, fieldName: string, typeName: string, schema: GraphQLSchema) => GraphQLArgumentConfig | [string, GraphQLArgumentConfig] | null | undefined;
242
- export declare type InputFieldMapper = GenericFieldMapper<GraphQLInputFieldConfig>;
package/es5/addTypes.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import { GraphQLSchema, GraphQLNamedType, GraphQLDirective } from 'graphql';
2
- export declare function addTypes(schema: GraphQLSchema, newTypesOrDirectives: Array<GraphQLNamedType | GraphQLDirective>): GraphQLSchema;
@@ -1,2 +0,0 @@
1
- import { GraphQLType, TypeNode } from 'graphql';
2
- export declare function astFromType(type: GraphQLType): TypeNode;
@@ -1,17 +0,0 @@
1
- import { ValueNode } from 'graphql';
2
- /**
3
- * Produces a GraphQL Value AST given a JavaScript object.
4
- * Function will match JavaScript/JSON values to GraphQL AST schema format
5
- * by using the following mapping.
6
- *
7
- * | JSON Value | GraphQL Value |
8
- * | ------------- | -------------------- |
9
- * | Object | Input Object |
10
- * | Array | List |
11
- * | Boolean | Boolean |
12
- * | String | String |
13
- * | Number | Int / Float |
14
- * | null | NullValue |
15
- *
16
- */
17
- export declare function astFromValueUntyped(value: any): ValueNode | null;
@@ -1,18 +0,0 @@
1
- import { GraphQLSchema, OperationDefinitionNode, OperationTypeNode } from 'graphql';
2
- export declare type Skip = string[];
3
- export declare type Force = string[];
4
- export declare type Ignore = string[];
5
- export declare type SelectedFields = {
6
- [key: string]: SelectedFields;
7
- } | boolean;
8
- export declare function buildOperationNodeForField({ schema, kind, field, models, ignore, depthLimit, circularReferenceDepth, argNames, selectedFields, }: {
9
- schema: GraphQLSchema;
10
- kind: OperationTypeNode;
11
- field: string;
12
- models?: string[];
13
- ignore?: Ignore;
14
- depthLimit?: number;
15
- circularReferenceDepth?: number;
16
- argNames?: string[];
17
- selectedFields?: SelectedFields;
18
- }): OperationDefinitionNode;
@@ -1,5 +0,0 @@
1
- import { GraphQLSchema, FragmentDefinitionNode, GraphQLObjectType, SelectionSetNode, FieldNode } from 'graphql';
2
- export declare function collectFields(schema: GraphQLSchema, fragments: Record<string, FragmentDefinitionNode>, variableValues: {
3
- [variable: string]: unknown;
4
- }, runtimeType: GraphQLObjectType, selectionSet: SelectionSetNode, fields: Map<string, Array<FieldNode>>, visitedFragmentNames: Set<string>): Map<string, Array<FieldNode>>;
5
- export declare const collectSubFields: (schema: GraphQLSchema, fragments: Record<string, FragmentDefinitionNode>, variableValues: Record<string, any>, type: GraphQLObjectType, fieldNodes: Array<FieldNode>) => Map<string, Array<FieldNode>>;
package/es5/comments.d.ts DELETED
@@ -1,30 +0,0 @@
1
- import { StringValueNode, ASTNode, NameNode, DefinitionNode, Location } from 'graphql';
2
- export declare type NamedDefinitionNode = DefinitionNode & {
3
- name?: NameNode;
4
- };
5
- export declare function resetComments(): void;
6
- export declare function collectComment(node: NamedDefinitionNode): void;
7
- export declare function pushComment(node: any, entity: string, field?: string, argument?: string): void;
8
- export declare function printComment(comment: string): string;
9
- /**
10
- * Converts an AST into a string, using one set of reasonable
11
- * formatting rules.
12
- */
13
- export declare function printWithComments(ast: ASTNode): string;
14
- export declare function getDescription(node: {
15
- description?: StringValueNode;
16
- loc?: Location;
17
- }, options?: {
18
- commentDescriptions?: boolean;
19
- }): string | undefined;
20
- export declare function getComment(node: {
21
- loc?: Location;
22
- }): undefined | string;
23
- export declare function getLeadingCommentBlock(node: {
24
- loc?: Location;
25
- }): void | string;
26
- export declare function dedentBlockStringValue(rawString: string): string;
27
- /**
28
- * @internal
29
- */
30
- export declare function getBlockStringIndentation(lines: ReadonlyArray<string>): number;
package/es5/errors.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import { GraphQLError } from 'graphql';
2
- export declare function relocatedError(originalError: GraphQLError, path?: ReadonlyArray<string | number>): GraphQLError;
package/es5/executor.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import { ExecutionResult, ExecutionRequest } from './Interfaces';
2
- declare type MaybePromise<T> = Promise<T> | T;
3
- declare type MaybeAsyncIterableIterator<T> = AsyncIterableIterator<T> | T;
4
- export declare type AsyncExecutor<TBaseContext = Record<string, any>, TBaseExtensions = Record<string, any>> = <TReturn = any, TArgs = Record<string, any>, TContext extends TBaseContext = TBaseContext, TRoot = any, TExtensions extends TBaseExtensions = TBaseExtensions>(request: ExecutionRequest<TArgs, TContext, TRoot, TExtensions>) => Promise<MaybeAsyncIterableIterator<ExecutionResult<TReturn>>>;
5
- export declare type SyncExecutor<TBaseContext = Record<string, any>, TBaseExtensions = Record<string, any>> = <TReturn = any, TArgs = Record<string, any>, TContext extends TBaseContext = TBaseContext, TRoot = any, TExtensions extends TBaseExtensions = TBaseExtensions>(request: ExecutionRequest<TArgs, TContext, TRoot, TExtensions>) => ExecutionResult<TReturn>;
6
- export declare type Executor<TBaseContext = Record<string, any>, TBaseExtensions = Record<string, any>> = <TReturn = any, TArgs = Record<string, any>, TContext extends TBaseContext = TBaseContext, TRoot = any, TExtensions extends TBaseExtensions = TBaseExtensions>(request: ExecutionRequest<TArgs, TContext, TRoot, TExtensions>) => MaybePromise<MaybeAsyncIterableIterator<ExecutionResult<TReturn>>>;
7
- export {};
package/es5/fields.d.ts DELETED
@@ -1,5 +0,0 @@
1
- import { GraphQLFieldConfigMap, GraphQLFieldConfig, GraphQLSchema } from 'graphql';
2
- export declare function appendObjectFields(schema: GraphQLSchema, typeName: string, additionalFields: GraphQLFieldConfigMap<any, any>): GraphQLSchema;
3
- export declare function removeObjectFields(schema: GraphQLSchema, typeName: string, testFn: (fieldName: string, field: GraphQLFieldConfig<any, any>) => boolean): [GraphQLSchema, GraphQLFieldConfigMap<any, any>];
4
- export declare function selectObjectFields(schema: GraphQLSchema, typeName: string, testFn: (fieldName: string, field: GraphQLFieldConfig<any, any>) => boolean): GraphQLFieldConfigMap<any, any>;
5
- export declare function modifyObjectFields(schema: GraphQLSchema, typeName: string, testFn: (fieldName: string, field: GraphQLFieldConfig<any, any>) => boolean, newFields: GraphQLFieldConfigMap<any, any>): [GraphQLSchema, GraphQLFieldConfigMap<any, any>];
@@ -1,12 +0,0 @@
1
- import { GraphQLSchema } from 'graphql';
2
- import { FieldFilter, RootFieldFilter, TypeFilter, ArgumentFilter } from './Interfaces';
3
- export declare function filterSchema({ schema, typeFilter, fieldFilter, rootFieldFilter, objectFieldFilter, interfaceFieldFilter, inputObjectFieldFilter, argumentFilter, }: {
4
- schema: GraphQLSchema;
5
- rootFieldFilter?: RootFieldFilter;
6
- typeFilter?: TypeFilter;
7
- fieldFilter?: FieldFilter;
8
- objectFieldFilter?: FieldFilter;
9
- interfaceFieldFilter?: FieldFilter;
10
- inputObjectFieldFilter?: FieldFilter;
11
- argumentFilter?: ArgumentFilter;
12
- }): GraphQLSchema;
@@ -1,3 +0,0 @@
1
- import { GraphQLSchema, BuildSchemaOptions } from 'graphql';
2
- import { SchemaPrintOptions } from './types';
3
- export declare function fixSchemaAst(schema: GraphQLSchema, options: BuildSchemaOptions & SchemaPrintOptions): GraphQLSchema;
@@ -1,3 +0,0 @@
1
- import { GraphQLSchema } from 'graphql';
2
- import { IDefaultValueIteratorFn } from './Interfaces';
3
- export declare function forEachDefaultValue(schema: GraphQLSchema, fn: IDefaultValueIteratorFn): void;
@@ -1,3 +0,0 @@
1
- import { GraphQLSchema } from 'graphql';
2
- import { IFieldIteratorFn } from './Interfaces';
3
- export declare function forEachField(schema: GraphQLSchema, fn: IFieldIteratorFn): void;
@@ -1,11 +0,0 @@
1
- import { GraphQLSchema, GraphQLNamedType, GraphQLField, GraphQLInputField, GraphQLFieldConfig, GraphQLInputFieldConfig, GraphQLSchemaConfig, GraphQLObjectTypeConfig, GraphQLInterfaceTypeConfig, GraphQLUnionTypeConfig, GraphQLScalarTypeConfig, GraphQLEnumTypeConfig, GraphQLInputObjectTypeConfig, GraphQLEnumValue, GraphQLEnumValueConfig } from 'graphql';
2
- export interface DirectiveAnnotation {
3
- name: string;
4
- args?: Record<string, any>;
5
- }
6
- declare type DirectableGraphQLObject = GraphQLSchema | GraphQLSchemaConfig | GraphQLNamedType | GraphQLObjectTypeConfig<any, any> | GraphQLInterfaceTypeConfig<any, any> | GraphQLUnionTypeConfig<any, any> | GraphQLScalarTypeConfig<any, any> | GraphQLEnumTypeConfig | GraphQLEnumValue | GraphQLEnumValueConfig | GraphQLInputObjectTypeConfig | GraphQLField<any, any> | GraphQLInputField | GraphQLFieldConfig<any, any> | GraphQLInputFieldConfig;
7
- export declare function getDirectivesInExtensions(node: DirectableGraphQLObject, pathToDirectivesInExtensions?: string[]): Array<DirectiveAnnotation>;
8
- export declare function getDirectiveInExtensions(node: DirectableGraphQLObject, directiveName: string, pathToDirectivesInExtensions?: string[]): Array<Record<string, any>> | undefined;
9
- export declare function getDirectives(schema: GraphQLSchema, node: DirectableGraphQLObject, pathToDirectivesInExtensions?: string[]): Array<DirectiveAnnotation>;
10
- export declare function getDirective(schema: GraphQLSchema, node: DirectableGraphQLObject, directiveName: string, pathToDirectivesInExtensions?: string[]): Array<Record<string, any>> | undefined;
11
- export {};
@@ -1,16 +0,0 @@
1
- import { DocumentNode } from 'graphql';
2
- export declare type DirectiveArgs = {
3
- [name: string]: any;
4
- };
5
- export declare type DirectiveUsage = {
6
- name: string;
7
- args: DirectiveArgs;
8
- };
9
- export declare type TypeAndFieldToDirectives = {
10
- [typeAndField: string]: DirectiveUsage[];
11
- };
12
- interface Options {
13
- includeInputTypes?: boolean;
14
- }
15
- export declare function getFieldsWithDirectives(documentNode: DocumentNode, options?: Options): TypeAndFieldToDirectives;
16
- export {};
@@ -1,2 +0,0 @@
1
- import { GraphQLSchema } from 'graphql';
2
- export declare function getImplementingTypes(interfaceName: string, schema: GraphQLSchema): string[];
@@ -1,10 +0,0 @@
1
- import { GraphQLField, GraphQLDirective, DirectiveNode, FieldNode } from 'graphql';
2
- /**
3
- * Prepares an object map of argument values given a list of argument
4
- * definitions and list of argument AST nodes.
5
- *
6
- * Note: The returned value is a plain Object with a prototype, since it is
7
- * exposed to user code. Care should be taken to not pull values from the
8
- * Object prototype.
9
- */
10
- export declare function getArgumentValues(def: GraphQLField<any, any> | GraphQLDirective, node: FieldNode | DirectiveNode, variableValues?: Record<string, any>): Record<string, any>;
@@ -1,3 +0,0 @@
1
- import { GraphQLNamedType, GraphQLObjectType } from 'graphql';
2
- import { Maybe } from './types';
3
- export declare function getObjectTypeFromTypeMap(typeMap: Record<string, GraphQLNamedType>, type: Maybe<GraphQLObjectType>): GraphQLObjectType | undefined;
@@ -1,3 +0,0 @@
1
- import { GraphQLSchema } from 'graphql';
2
- import { IResolvers } from './Interfaces';
3
- export declare function getResolversFromSchema(schema: GraphQLSchema): IResolvers;
@@ -1,7 +0,0 @@
1
- import { GraphQLResolveInfo } from 'graphql';
2
- /**
3
- * Get the key under which the result of this resolver will be placed in the response JSON. Basically, just
4
- * resolves aliases.
5
- * @param info The info argument to the resolver.
6
- */
7
- export declare function getResponseKeyFromInfo(info: GraphQLResolveInfo): string;
package/es5/heal.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { GraphQLDirective, GraphQLNamedType, GraphQLSchema } from 'graphql';
2
- export declare function healSchema(schema: GraphQLSchema): GraphQLSchema;
3
- export declare function healTypes(originalTypeMap: Record<string, GraphQLNamedType | null>, directives: ReadonlyArray<GraphQLDirective>): void;
package/es5/helpers.d.ts DELETED
@@ -1,9 +0,0 @@
1
- import { ASTNode } from 'graphql';
2
- export declare const asArray: <T>(fns: T | T[]) => T[];
3
- export declare function isDocumentString(str: any): boolean;
4
- export declare function isValidPath(str: any): boolean;
5
- export declare function compareStrings<A, B>(a: A, b: B): 1 | -1 | 0;
6
- export declare function nodeToString(a: ASTNode): string;
7
- export declare function compareNodes(a: ASTNode, b: ASTNode, customFn?: (a: any, b: any) => number): number;
8
- export declare function isSome<T>(input: T): input is Exclude<T, null | undefined>;
9
- export declare function assertSome<T>(input: T, message?: string): asserts input is Exclude<T, null | undefined>;
@@ -1,3 +0,0 @@
1
- import { GraphQLType, GraphQLSchema } from 'graphql';
2
- import { Maybe } from '@graphql-tools/utils';
3
- export declare function implementsAbstractType(schema: GraphQLSchema, typeA: Maybe<GraphQLType>, typeB: Maybe<GraphQLType>): boolean;