@graphql-tools/wrap 8.5.2-alpha-e7752ba5.0 → 8.5.2-alpha-b9e4a92b.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 (102) hide show
  1. package/cjs/introspect.js +1 -1
  2. package/cjs/transforms/ExtractField.js +1 -1
  3. package/cjs/transforms/HoistField.js +1 -1
  4. package/cjs/transforms/MapLeafValues.js +1 -1
  5. package/cjs/transforms/RenameRootTypes.js +1 -1
  6. package/cjs/transforms/RenameTypes.js +1 -1
  7. package/cjs/transforms/TransformCompositeFields.js +1 -1
  8. package/cjs/transforms/TransformInputObjectFields.js +1 -1
  9. package/cjs/transforms/TransformInterfaceFields.js +1 -1
  10. package/cjs/transforms/TransformObjectFields.js +1 -1
  11. package/cjs/transforms/TransformQuery.js +1 -1
  12. package/cjs/transforms/WrapFields.js +1 -1
  13. package/cjs/transforms/WrapQuery.js +1 -1
  14. package/cjs/wrapSchema.js +1 -1
  15. package/esm/introspect.js +1 -1
  16. package/esm/transforms/ExtractField.js +1 -1
  17. package/esm/transforms/HoistField.js +1 -1
  18. package/esm/transforms/MapLeafValues.js +1 -1
  19. package/esm/transforms/RenameRootTypes.js +1 -1
  20. package/esm/transforms/RenameTypes.js +1 -1
  21. package/esm/transforms/TransformCompositeFields.js +1 -1
  22. package/esm/transforms/TransformInputObjectFields.js +1 -1
  23. package/esm/transforms/TransformInterfaceFields.js +1 -1
  24. package/esm/transforms/TransformObjectFields.js +1 -1
  25. package/esm/transforms/TransformQuery.js +1 -1
  26. package/esm/transforms/WrapFields.js +1 -1
  27. package/esm/transforms/WrapQuery.js +1 -1
  28. package/esm/wrapSchema.js +1 -1
  29. package/package.json +9 -7
  30. package/typings/generateProxyingResolvers.d.cts +4 -0
  31. package/typings/generateProxyingResolvers.d.ts +1 -1
  32. package/typings/index.d.cts +5 -0
  33. package/typings/introspect.d.cts +4 -0
  34. package/typings/introspect.d.ts +1 -1
  35. package/typings/transforms/ExtractField.d.cts +14 -0
  36. package/typings/transforms/FilterInputObjectFields.d.cts +13 -0
  37. package/typings/transforms/FilterInputObjectFields.d.ts +1 -1
  38. package/typings/transforms/FilterInterfaceFields.d.cts +11 -0
  39. package/typings/transforms/FilterInterfaceFields.d.ts +1 -1
  40. package/typings/transforms/FilterObjectFieldDirectives.d.cts +10 -0
  41. package/typings/transforms/FilterObjectFieldDirectives.d.ts +1 -1
  42. package/typings/transforms/FilterObjectFields.d.cts +11 -0
  43. package/typings/transforms/FilterObjectFields.d.ts +1 -1
  44. package/typings/transforms/FilterRootFields.d.cts +11 -0
  45. package/typings/transforms/FilterRootFields.d.ts +1 -1
  46. package/typings/transforms/FilterTypes.d.cts +10 -0
  47. package/typings/transforms/FilterTypes.d.ts +1 -1
  48. package/typings/transforms/HoistField.d.cts +25 -0
  49. package/typings/transforms/HoistField.d.ts +1 -1
  50. package/typings/transforms/MapFields.d.cts +18 -0
  51. package/typings/transforms/MapFields.d.ts +1 -1
  52. package/typings/transforms/MapLeafValues.d.cts +22 -0
  53. package/typings/transforms/MapLeafValues.d.ts +1 -1
  54. package/typings/transforms/PruneSchema.d.cts +11 -0
  55. package/typings/transforms/PruneSchema.d.ts +1 -1
  56. package/typings/transforms/RemoveObjectFieldDeprecations.d.cts +11 -0
  57. package/typings/transforms/RemoveObjectFieldDeprecations.d.ts +1 -1
  58. package/typings/transforms/RemoveObjectFieldDirectives.d.cts +10 -0
  59. package/typings/transforms/RemoveObjectFieldDirectives.d.ts +1 -1
  60. package/typings/transforms/RemoveObjectFieldsWithDeprecation.d.cts +10 -0
  61. package/typings/transforms/RemoveObjectFieldsWithDeprecation.d.ts +1 -1
  62. package/typings/transforms/RemoveObjectFieldsWithDirective.d.cts +11 -0
  63. package/typings/transforms/RemoveObjectFieldsWithDirective.d.ts +1 -1
  64. package/typings/transforms/RenameInputObjectFields.d.cts +15 -0
  65. package/typings/transforms/RenameInputObjectFields.d.ts +1 -1
  66. package/typings/transforms/RenameInterfaceFields.d.cts +12 -0
  67. package/typings/transforms/RenameInterfaceFields.d.ts +1 -1
  68. package/typings/transforms/RenameObjectFieldArguments.d.cts +15 -0
  69. package/typings/transforms/RenameObjectFieldArguments.d.ts +1 -1
  70. package/typings/transforms/RenameObjectFields.d.cts +12 -0
  71. package/typings/transforms/RenameObjectFields.d.ts +1 -1
  72. package/typings/transforms/RenameRootFields.d.cts +12 -0
  73. package/typings/transforms/RenameRootFields.d.ts +1 -1
  74. package/typings/transforms/RenameRootTypes.d.cts +15 -0
  75. package/typings/transforms/RenameRootTypes.d.ts +1 -1
  76. package/typings/transforms/RenameTypes.d.cts +17 -0
  77. package/typings/transforms/RenameTypes.d.ts +1 -1
  78. package/typings/transforms/TransformCompositeFields.d.cts +24 -0
  79. package/typings/transforms/TransformCompositeFields.d.ts +1 -1
  80. package/typings/transforms/TransformEnumValues.d.cts +20 -0
  81. package/typings/transforms/TransformEnumValues.d.ts +1 -1
  82. package/typings/transforms/TransformInputObjectFields.d.cts +19 -0
  83. package/typings/transforms/TransformInputObjectFields.d.ts +1 -1
  84. package/typings/transforms/TransformInterfaceFields.d.cts +17 -0
  85. package/typings/transforms/TransformInterfaceFields.d.ts +1 -1
  86. package/typings/transforms/TransformObjectFields.d.cts +17 -0
  87. package/typings/transforms/TransformObjectFields.d.ts +1 -1
  88. package/typings/transforms/TransformQuery.d.cts +27 -0
  89. package/typings/transforms/TransformQuery.d.ts +1 -1
  90. package/typings/transforms/TransformRootFields.d.cts +17 -0
  91. package/typings/transforms/TransformRootFields.d.ts +1 -1
  92. package/typings/transforms/WrapFields.d.cts +24 -0
  93. package/typings/transforms/WrapFields.d.ts +1 -1
  94. package/typings/transforms/WrapQuery.d.cts +15 -0
  95. package/typings/transforms/WrapQuery.d.ts +1 -1
  96. package/typings/transforms/WrapType.d.cts +13 -0
  97. package/typings/transforms/WrapType.d.ts +1 -1
  98. package/typings/transforms/index.d.cts +32 -0
  99. package/typings/types.d.cts +14 -0
  100. package/typings/types.d.ts +1 -1
  101. package/typings/wrapSchema.d.cts +3 -0
  102. package/typings/wrapSchema.d.ts +1 -1
package/cjs/introspect.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.introspectSchema = void 0;
4
- const graphql_1 = require("@graphql-tools/graphql");
4
+ const graphql_1 = require("graphql");
5
5
  const value_or_promise_1 = require("value-or-promise");
6
6
  const utils_1 = require("@graphql-tools/utils");
7
7
  function getSchemaFromIntrospection(introspectionResult, options) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const graphql_1 = require("@graphql-tools/graphql");
3
+ const graphql_1 = require("graphql");
4
4
  class ExtractField {
5
5
  constructor({ from, to }) {
6
6
  this.from = from;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.unwrapValue = exports.renameFieldNode = exports.wrapFieldNode = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const graphql_1 = require("@graphql-tools/graphql");
5
+ const graphql_1 = require("graphql");
6
6
  const utils_1 = require("@graphql-tools/utils");
7
7
  const delegate_1 = require("@graphql-tools/delegate");
8
8
  const generateProxyingResolvers_js_1 = require("../generateProxyingResolvers.js");
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const graphql_1 = require("@graphql-tools/graphql");
3
+ const graphql_1 = require("graphql");
4
4
  const utils_1 = require("@graphql-tools/utils");
5
5
  class MapLeafValues {
6
6
  constructor(inputValueTransformer, outputValueTransformer) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const graphql_1 = require("@graphql-tools/graphql");
3
+ const graphql_1 = require("graphql");
4
4
  const utils_1 = require("@graphql-tools/utils");
5
5
  class RenameRootTypes {
6
6
  constructor(renamer) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const graphql_1 = require("@graphql-tools/graphql");
3
+ const graphql_1 = require("graphql");
4
4
  const utils_1 = require("@graphql-tools/utils");
5
5
  class RenameTypes {
6
6
  constructor(renamer, options) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const graphql_1 = require("@graphql-tools/graphql");
3
+ const graphql_1 = require("graphql");
4
4
  const utils_1 = require("@graphql-tools/utils");
5
5
  class TransformCompositeFields {
6
6
  constructor(fieldTransformer, fieldNodeTransformer, dataTransformer, errorsTransformer) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const graphql_1 = require("@graphql-tools/graphql");
3
+ const graphql_1 = require("graphql");
4
4
  const utils_1 = require("@graphql-tools/utils");
5
5
  class TransformInputObjectFields {
6
6
  constructor(inputFieldTransformer, inputFieldNodeTransformer, inputObjectNodeTransformer) {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const graphql_1 = require("@graphql-tools/graphql");
4
+ const graphql_1 = require("graphql");
5
5
  const TransformCompositeFields_js_1 = tslib_1.__importDefault(require("./TransformCompositeFields.js"));
6
6
  class TransformInterfaceFields {
7
7
  constructor(interfaceFieldTransformer, fieldNodeTransformer) {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const graphql_1 = require("@graphql-tools/graphql");
4
+ const graphql_1 = require("graphql");
5
5
  const TransformCompositeFields_js_1 = tslib_1.__importDefault(require("./TransformCompositeFields.js"));
6
6
  class TransformObjectFields {
7
7
  constructor(objectFieldTransformer, fieldNodeTransformer) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const graphql_1 = require("@graphql-tools/graphql");
3
+ const graphql_1 = require("graphql");
4
4
  const utils_1 = require("@graphql-tools/utils");
5
5
  class TransformQuery {
6
6
  constructor({ path, queryTransformer, resultTransformer = result => result, errorPathTransformer = errorPath => [...errorPath], fragments = {}, }) {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.dehoistValue = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const graphql_1 = require("@graphql-tools/graphql");
5
+ const graphql_1 = require("graphql");
6
6
  const utils_1 = require("@graphql-tools/utils");
7
7
  const delegate_1 = require("@graphql-tools/delegate");
8
8
  const MapFields_js_1 = tslib_1.__importDefault(require("./MapFields.js"));
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const graphql_1 = require("@graphql-tools/graphql");
3
+ const graphql_1 = require("graphql");
4
4
  class WrapQuery {
5
5
  constructor(path, wrapper, extractor) {
6
6
  this.path = path;
package/cjs/wrapSchema.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.wrapSchema = void 0;
4
- const graphql_1 = require("@graphql-tools/graphql");
4
+ const graphql_1 = require("graphql");
5
5
  const utils_1 = require("@graphql-tools/utils");
6
6
  const delegate_1 = require("@graphql-tools/delegate");
7
7
  const generateProxyingResolvers_js_1 = require("./generateProxyingResolvers.js");
package/esm/introspect.js CHANGED
@@ -1,4 +1,4 @@
1
- import { getIntrospectionQuery, buildClientSchema, parse, } from '@graphql-tools/graphql';
1
+ import { getIntrospectionQuery, buildClientSchema, parse, } from 'graphql';
2
2
  import { ValueOrPromise } from 'value-or-promise';
3
3
  import { isAsyncIterable } from '@graphql-tools/utils';
4
4
  function getSchemaFromIntrospection(introspectionResult, options) {
@@ -1,4 +1,4 @@
1
- import { visit, Kind, BREAK } from '@graphql-tools/graphql';
1
+ import { visit, Kind, BREAK } from 'graphql';
2
2
  export default class ExtractField {
3
3
  constructor({ from, to }) {
4
4
  this.from = from;
@@ -1,4 +1,4 @@
1
- import { getNullableType, Kind, } from '@graphql-tools/graphql';
1
+ import { getNullableType, Kind, } from 'graphql';
2
2
  import { appendObjectFields, removeObjectFields, relocatedError, } from '@graphql-tools/utils';
3
3
  import { defaultMergedResolver } from '@graphql-tools/delegate';
4
4
  import { defaultCreateProxyingResolver } from '../generateProxyingResolvers.js';
@@ -1,4 +1,4 @@
1
- import { visit, Kind, TypeInfo, visitWithTypeInfo, valueFromAST, isLeafType, } from '@graphql-tools/graphql';
1
+ import { visit, Kind, TypeInfo, visitWithTypeInfo, valueFromAST, isLeafType, } from 'graphql';
2
2
  import { visitResult, updateArgument, transformInputValue, createVariableNameGenerator, } from '@graphql-tools/utils';
3
3
  export default class MapLeafValues {
4
4
  constructor(inputValueTransformer, outputValueTransformer) {
@@ -1,4 +1,4 @@
1
- import { visit, Kind } from '@graphql-tools/graphql';
1
+ import { visit, Kind } from 'graphql';
2
2
  import { MapperKind, mapSchema, renameType, visitData } from '@graphql-tools/utils';
3
3
  export default class RenameRootTypes {
4
4
  constructor(renamer) {
@@ -1,4 +1,4 @@
1
- import { Kind, isScalarType, isSpecifiedScalarType, visit, } from '@graphql-tools/graphql';
1
+ import { Kind, isScalarType, isSpecifiedScalarType, visit, } from 'graphql';
2
2
  import { MapperKind, mapSchema, visitData, renameType, } from '@graphql-tools/utils';
3
3
  export default class RenameTypes {
4
4
  constructor(renamer, options) {
@@ -1,4 +1,4 @@
1
- import { TypeInfo, visit, visitWithTypeInfo, Kind, } from '@graphql-tools/graphql';
1
+ import { TypeInfo, visit, visitWithTypeInfo, Kind, } from 'graphql';
2
2
  import { MapperKind, mapSchema, visitData } from '@graphql-tools/utils';
3
3
  export default class TransformCompositeFields {
4
4
  constructor(fieldTransformer, fieldNodeTransformer, dataTransformer, errorsTransformer) {
@@ -1,4 +1,4 @@
1
- import { typeFromAST, TypeInfo, visit, visitWithTypeInfo, Kind, isInputType, } from '@graphql-tools/graphql';
1
+ import { typeFromAST, TypeInfo, visit, visitWithTypeInfo, Kind, isInputType, } from 'graphql';
2
2
  import { MapperKind, mapSchema, transformInputValue } from '@graphql-tools/utils';
3
3
  export default class TransformInputObjectFields {
4
4
  constructor(inputFieldTransformer, inputFieldNodeTransformer, inputObjectNodeTransformer) {
@@ -1,4 +1,4 @@
1
- import { isInterfaceType } from '@graphql-tools/graphql';
1
+ import { isInterfaceType } from 'graphql';
2
2
  import TransformCompositeFields from './TransformCompositeFields.js';
3
3
  export default class TransformInterfaceFields {
4
4
  constructor(interfaceFieldTransformer, fieldNodeTransformer) {
@@ -1,4 +1,4 @@
1
- import { isObjectType } from '@graphql-tools/graphql';
1
+ import { isObjectType } from 'graphql';
2
2
  import TransformCompositeFields from './TransformCompositeFields.js';
3
3
  export default class TransformObjectFields {
4
4
  constructor(objectFieldTransformer, fieldNodeTransformer) {
@@ -1,4 +1,4 @@
1
- import { visit, Kind } from '@graphql-tools/graphql';
1
+ import { visit, Kind } from 'graphql';
2
2
  import { relocatedError } from '@graphql-tools/utils';
3
3
  export default class TransformQuery {
4
4
  constructor({ path, queryTransformer, resultTransformer = result => result, errorPathTransformer = errorPath => [...errorPath], fragments = {}, }) {
@@ -1,4 +1,4 @@
1
- import { Kind, GraphQLNonNull, } from '@graphql-tools/graphql';
1
+ import { Kind, GraphQLNonNull, } from 'graphql';
2
2
  import { appendObjectFields, selectObjectFields, modifyObjectFields, relocatedError, } from '@graphql-tools/utils';
3
3
  import { defaultMergedResolver } from '@graphql-tools/delegate';
4
4
  import MapFields from './MapFields.js';
@@ -1,4 +1,4 @@
1
- import { visit, Kind } from '@graphql-tools/graphql';
1
+ import { visit, Kind } from 'graphql';
2
2
  export default class WrapQuery {
3
3
  constructor(path, wrapper, extractor) {
4
4
  this.path = path;
package/esm/wrapSchema.js CHANGED
@@ -1,4 +1,4 @@
1
- import { GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, } from '@graphql-tools/graphql';
1
+ import { GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, } from 'graphql';
2
2
  import { MapperKind, mapSchema } from '@graphql-tools/utils';
3
3
  import { defaultMergedResolver, applySchemaTransforms } from '@graphql-tools/delegate';
4
4
  import { generateProxyingResolvers } from './generateProxyingResolvers.js';
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "@graphql-tools/wrap",
3
- "version": "8.5.2-alpha-e7752ba5.0",
3
+ "version": "8.5.2-alpha-b9e4a92b.0",
4
4
  "description": "A set of utils for faster development of GraphQL tools",
5
5
  "sideEffects": false,
6
+ "peerDependencies": {
7
+ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
8
+ },
6
9
  "dependencies": {
7
- "@graphql-tools/delegate": "8.8.2-alpha-e7752ba5.0",
8
- "@graphql-tools/schema": "8.5.2-alpha-e7752ba5.0",
9
- "@graphql-tools/utils": "8.9.1-alpha-e7752ba5.0",
10
- "@graphql-tools/graphql": "0.1.0-alpha-e7752ba5.0",
10
+ "@graphql-tools/delegate": "8.8.2-alpha-b9e4a92b.0",
11
+ "@graphql-tools/schema": "8.5.2-alpha-b9e4a92b.0",
12
+ "@graphql-tools/utils": "8.9.1-alpha-b9e4a92b.0",
11
13
  "tslib": "^2.4.0",
12
14
  "value-or-promise": "1.0.11"
13
15
  },
@@ -27,7 +29,7 @@
27
29
  "exports": {
28
30
  ".": {
29
31
  "require": {
30
- "types": "./typings/index.d.ts",
32
+ "types": "./typings/index.d.cts",
31
33
  "default": "./cjs/index.js"
32
34
  },
33
35
  "import": {
@@ -41,7 +43,7 @@
41
43
  },
42
44
  "./*": {
43
45
  "require": {
44
- "types": "./typings/*.d.ts",
46
+ "types": "./typings/*.d.cts",
45
47
  "default": "./cjs/*.js"
46
48
  },
47
49
  "import": {
@@ -0,0 +1,4 @@
1
+ import { GraphQLFieldResolver } from 'graphql';
2
+ import { SubschemaConfig, ICreateProxyingResolverOptions } from '@graphql-tools/delegate';
3
+ export declare function generateProxyingResolvers<TContext extends Record<string, any>>(subschemaConfig: SubschemaConfig<any, any, any, TContext>): Record<string, Record<string, GraphQLFieldResolver<any, any>>>;
4
+ export declare function defaultCreateProxyingResolver<TContext extends Record<string, any>>({ subschemaConfig, operation, transformedSchema, }: ICreateProxyingResolverOptions<TContext>): GraphQLFieldResolver<any, any>;
@@ -1,4 +1,4 @@
1
- import { GraphQLFieldResolver } from '@graphql-tools/graphql';
1
+ import { GraphQLFieldResolver } from 'graphql';
2
2
  import { SubschemaConfig, ICreateProxyingResolverOptions } from '@graphql-tools/delegate';
3
3
  export declare function generateProxyingResolvers<TContext extends Record<string, any>>(subschemaConfig: SubschemaConfig<any, any, any, TContext>): Record<string, Record<string, GraphQLFieldResolver<any, any>>>;
4
4
  export declare function defaultCreateProxyingResolver<TContext extends Record<string, any>>({ subschemaConfig, operation, transformedSchema, }: ICreateProxyingResolverOptions<TContext>): GraphQLFieldResolver<any, any>;
@@ -0,0 +1,5 @@
1
+ export { wrapSchema } from './wrapSchema.cjs';
2
+ export { defaultCreateProxyingResolver, generateProxyingResolvers } from './generateProxyingResolvers.cjs';
3
+ export * from './transforms/index.cjs';
4
+ export * from './types.cjs';
5
+ export * from './introspect.cjs';
@@ -0,0 +1,4 @@
1
+ import { GraphQLSchema, buildClientSchema, IntrospectionOptions, ParseOptions } from 'graphql';
2
+ import { AsyncExecutor, SyncExecutor } from '@graphql-tools/utils';
3
+ export declare function introspectSchema(executor: SyncExecutor, context?: Record<string, any>, options?: Partial<IntrospectionOptions> & Parameters<typeof buildClientSchema>[1] & ParseOptions): GraphQLSchema;
4
+ export declare function introspectSchema(executor: AsyncExecutor, context?: Record<string, any>, options?: Partial<IntrospectionOptions> & Parameters<typeof buildClientSchema>[1] & ParseOptions): Promise<GraphQLSchema>;
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema, buildClientSchema, IntrospectionOptions, ParseOptions } from '@graphql-tools/graphql';
1
+ import { GraphQLSchema, buildClientSchema, IntrospectionOptions, ParseOptions } from 'graphql';
2
2
  import { AsyncExecutor, SyncExecutor } from '@graphql-tools/utils';
3
3
  export declare function introspectSchema(executor: SyncExecutor, context?: Record<string, any>, options?: Partial<IntrospectionOptions> & Parameters<typeof buildClientSchema>[1] & ParseOptions): GraphQLSchema;
4
4
  export declare function introspectSchema(executor: AsyncExecutor, context?: Record<string, any>, options?: Partial<IntrospectionOptions> & Parameters<typeof buildClientSchema>[1] & ParseOptions): Promise<GraphQLSchema>;
@@ -0,0 +1,14 @@
1
+ import { ExecutionRequest } from '@graphql-tools/utils';
2
+ import { Transform, DelegationContext } from '@graphql-tools/delegate';
3
+ interface ExtractFieldTransformationContext extends Record<string, any> {
4
+ }
5
+ export default class ExtractField<TContext = Record<string, any>> implements Transform<ExtractFieldTransformationContext, TContext> {
6
+ private readonly from;
7
+ private readonly to;
8
+ constructor({ from, to }: {
9
+ from: Array<string>;
10
+ to: Array<string>;
11
+ });
12
+ transformRequest(originalRequest: ExecutionRequest, _delegationContext: DelegationContext<TContext>, _transformationContext: ExtractFieldTransformationContext): ExecutionRequest;
13
+ }
14
+ export {};
@@ -0,0 +1,13 @@
1
+ import { GraphQLSchema } from 'graphql';
2
+ import { ExecutionRequest, InputFieldFilter } from '@graphql-tools/utils';
3
+ import { Transform, DelegationContext, SubschemaConfig } from '@graphql-tools/delegate';
4
+ import { InputObjectNodeTransformer } from '../types.cjs';
5
+ interface FilterInputObjectFieldsTransformationContext extends Record<string, any> {
6
+ }
7
+ export default class FilterInputObjectFields<TContext = Record<string, any>> implements Transform<FilterInputObjectFieldsTransformationContext, TContext> {
8
+ private readonly transformer;
9
+ constructor(filter: InputFieldFilter, inputObjectNodeTransformer?: InputObjectNodeTransformer);
10
+ transformSchema(originalWrappingSchema: GraphQLSchema, subschemaConfig: SubschemaConfig<any, any, any, TContext>, transformedSchema?: GraphQLSchema): GraphQLSchema;
11
+ transformRequest(originalRequest: ExecutionRequest, delegationContext: DelegationContext<TContext>, transformationContext: FilterInputObjectFieldsTransformationContext): ExecutionRequest;
12
+ }
13
+ export {};
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema } from '@graphql-tools/graphql';
1
+ import { GraphQLSchema } from 'graphql';
2
2
  import { ExecutionRequest, InputFieldFilter } from '@graphql-tools/utils';
3
3
  import { Transform, DelegationContext, SubschemaConfig } from '@graphql-tools/delegate';
4
4
  import { InputObjectNodeTransformer } from '../types.js';
@@ -0,0 +1,11 @@
1
+ import { GraphQLSchema } from 'graphql';
2
+ import { FieldFilter } from '@graphql-tools/utils';
3
+ import { SubschemaConfig, Transform } from '@graphql-tools/delegate';
4
+ interface FilterInterfaceFieldsTransformationContext extends Record<string, any> {
5
+ }
6
+ export default class FilterInterfaceFields<TContext = Record<string, any>> implements Transform<FilterInterfaceFieldsTransformationContext, TContext> {
7
+ private readonly transformer;
8
+ constructor(filter: FieldFilter);
9
+ transformSchema(originalWrappingSchema: GraphQLSchema, subschemaConfig: SubschemaConfig<any, any, any, TContext>, transformedSchema?: GraphQLSchema): GraphQLSchema;
10
+ }
11
+ export {};
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema } from '@graphql-tools/graphql';
1
+ import { GraphQLSchema } from 'graphql';
2
2
  import { FieldFilter } from '@graphql-tools/utils';
3
3
  import { SubschemaConfig, Transform } from '@graphql-tools/delegate';
4
4
  interface FilterInterfaceFieldsTransformationContext extends Record<string, any> {
@@ -0,0 +1,10 @@
1
+ import { GraphQLSchema } from 'graphql';
2
+ import { SubschemaConfig, Transform } from '@graphql-tools/delegate';
3
+ interface FilterObjectFieldDirectivesTransformationContext extends Record<string, any> {
4
+ }
5
+ export default class FilterObjectFieldDirectives<TContext = Record<string, any>> implements Transform<FilterObjectFieldDirectivesTransformationContext, TContext> {
6
+ private readonly filter;
7
+ constructor(filter: (dirName: string, dirValue: any) => boolean);
8
+ transformSchema(originalWrappingSchema: GraphQLSchema, subschemaConfig: SubschemaConfig<any, any, any, TContext>, transformedSchema?: GraphQLSchema): GraphQLSchema;
9
+ }
10
+ export {};
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema } from '@graphql-tools/graphql';
1
+ import { GraphQLSchema } from 'graphql';
2
2
  import { SubschemaConfig, Transform } from '@graphql-tools/delegate';
3
3
  interface FilterObjectFieldDirectivesTransformationContext extends Record<string, any> {
4
4
  }
@@ -0,0 +1,11 @@
1
+ import { GraphQLSchema } from 'graphql';
2
+ import { ObjectFieldFilter } from '@graphql-tools/utils';
3
+ import { SubschemaConfig, Transform } from '@graphql-tools/delegate';
4
+ interface FilterObjectFieldsTransformationContext extends Record<string, any> {
5
+ }
6
+ export default class FilterObjectFields<TContext = Record<string, any>> implements Transform<FilterObjectFieldsTransformationContext, TContext> {
7
+ private readonly transformer;
8
+ constructor(filter: ObjectFieldFilter);
9
+ transformSchema(originalWrappingSchema: GraphQLSchema, subschemaConfig: SubschemaConfig<any, any, any, TContext>, transformedSchema?: GraphQLSchema): GraphQLSchema;
10
+ }
11
+ export {};
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema } from '@graphql-tools/graphql';
1
+ import { GraphQLSchema } from 'graphql';
2
2
  import { ObjectFieldFilter } from '@graphql-tools/utils';
3
3
  import { SubschemaConfig, Transform } from '@graphql-tools/delegate';
4
4
  interface FilterObjectFieldsTransformationContext extends Record<string, any> {
@@ -0,0 +1,11 @@
1
+ import { GraphQLSchema } from 'graphql';
2
+ import { RootFieldFilter } from '@graphql-tools/utils';
3
+ import { SubschemaConfig, Transform } from '@graphql-tools/delegate';
4
+ interface FilterRootFieldsTransformationContext extends Record<string, any> {
5
+ }
6
+ export default class FilterRootFields<TContext = Record<string, any>> implements Transform<FilterRootFieldsTransformationContext, TContext> {
7
+ private readonly transformer;
8
+ constructor(filter: RootFieldFilter);
9
+ transformSchema(originalWrappingSchema: GraphQLSchema, subschemaConfig: SubschemaConfig<any, any, any, TContext>, transformedSchema?: GraphQLSchema): GraphQLSchema;
10
+ }
11
+ export {};
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema } from '@graphql-tools/graphql';
1
+ import { GraphQLSchema } from 'graphql';
2
2
  import { RootFieldFilter } from '@graphql-tools/utils';
3
3
  import { SubschemaConfig, Transform } from '@graphql-tools/delegate';
4
4
  interface FilterRootFieldsTransformationContext extends Record<string, any> {
@@ -0,0 +1,10 @@
1
+ import { GraphQLSchema, GraphQLNamedType } from 'graphql';
2
+ import { SubschemaConfig, Transform } from '@graphql-tools/delegate';
3
+ interface FilterTypesTransformationContext extends Record<string, any> {
4
+ }
5
+ export default class FilterTypes<TContext = Record<string, any>> implements Transform<FilterTypesTransformationContext, TContext> {
6
+ private readonly filter;
7
+ constructor(filter: (type: GraphQLNamedType) => boolean);
8
+ transformSchema(originalWrappingSchema: GraphQLSchema, _subschemaConfig: SubschemaConfig<any, any, any, TContext>, _transformedSchema?: GraphQLSchema): GraphQLSchema;
9
+ }
10
+ export {};
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema, GraphQLNamedType } from '@graphql-tools/graphql';
1
+ import { GraphQLSchema, GraphQLNamedType } from 'graphql';
2
2
  import { SubschemaConfig, Transform } from '@graphql-tools/delegate';
3
3
  interface FilterTypesTransformationContext extends Record<string, any> {
4
4
  }
@@ -0,0 +1,25 @@
1
+ import { GraphQLSchema, FieldNode, GraphQLArgument } from 'graphql';
2
+ import { ExecutionRequest, ExecutionResult } from '@graphql-tools/utils';
3
+ import { Transform, DelegationContext, SubschemaConfig } from '@graphql-tools/delegate';
4
+ interface HoistFieldTransformationContext extends Record<string, any> {
5
+ }
6
+ export default class HoistField<TContext = Record<string, any>> implements Transform<HoistFieldTransformationContext, TContext> {
7
+ private readonly typeName;
8
+ private readonly newFieldName;
9
+ private readonly pathToField;
10
+ private readonly oldFieldName;
11
+ private readonly argFilters;
12
+ private readonly argLevels;
13
+ private readonly transformer;
14
+ constructor(typeName: string, pathConfig: Array<string | {
15
+ fieldName: string;
16
+ argFilter?: (arg: GraphQLArgument) => boolean;
17
+ }>, newFieldName: string, alias?: string);
18
+ transformSchema(originalWrappingSchema: GraphQLSchema, subschemaConfig: SubschemaConfig<any, any, any, TContext>, transformedSchema?: GraphQLSchema): GraphQLSchema;
19
+ transformRequest(originalRequest: ExecutionRequest, delegationContext: DelegationContext<TContext>, transformationContext: HoistFieldTransformationContext): ExecutionRequest;
20
+ transformResult(originalResult: ExecutionResult, delegationContext: DelegationContext<TContext>, transformationContext: HoistFieldTransformationContext): ExecutionResult;
21
+ }
22
+ export declare function wrapFieldNode(fieldNode: FieldNode, path: Array<string>, alias: string, argLevels: Record<string, number>): FieldNode;
23
+ export declare function renameFieldNode(fieldNode: FieldNode, name: string): FieldNode;
24
+ export declare function unwrapValue(originalValue: any, alias: string): any;
25
+ export {};
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema, FieldNode, GraphQLArgument } from '@graphql-tools/graphql';
1
+ import { GraphQLSchema, FieldNode, GraphQLArgument } from 'graphql';
2
2
  import { ExecutionRequest, ExecutionResult } from '@graphql-tools/utils';
3
3
  import { Transform, DelegationContext, SubschemaConfig } from '@graphql-tools/delegate';
4
4
  interface HoistFieldTransformationContext extends Record<string, any> {
@@ -0,0 +1,18 @@
1
+ import { GraphQLSchema } from 'graphql';
2
+ import { ExecutionRequest, FieldNodeMappers, ExecutionResult } from '@graphql-tools/utils';
3
+ import { Transform, DelegationContext, SubschemaConfig } from '@graphql-tools/delegate';
4
+ import { ObjectValueTransformerMap, ErrorsTransformer } from '../types.cjs';
5
+ interface MapFieldsTransformationContext extends Record<string, any> {
6
+ }
7
+ export default class MapFields<TContext> implements Transform<MapFieldsTransformationContext, TContext> {
8
+ private fieldNodeTransformerMap;
9
+ private objectValueTransformerMap?;
10
+ private errorsTransformer?;
11
+ private transformer;
12
+ constructor(fieldNodeTransformerMap: FieldNodeMappers, objectValueTransformerMap?: ObjectValueTransformerMap, errorsTransformer?: ErrorsTransformer);
13
+ private _getTransformer;
14
+ transformSchema(originalWrappingSchema: GraphQLSchema, subschemaConfig: SubschemaConfig<any, any, any, TContext>, transformedSchema?: GraphQLSchema): GraphQLSchema;
15
+ transformRequest(originalRequest: ExecutionRequest, delegationContext: DelegationContext<TContext>, transformationContext: MapFieldsTransformationContext): ExecutionRequest;
16
+ transformResult(originalResult: ExecutionResult, delegationContext: DelegationContext<TContext>, transformationContext: MapFieldsTransformationContext): ExecutionResult;
17
+ }
18
+ export {};
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema } from '@graphql-tools/graphql';
1
+ import { GraphQLSchema } from 'graphql';
2
2
  import { ExecutionRequest, FieldNodeMappers, ExecutionResult } from '@graphql-tools/utils';
3
3
  import { Transform, DelegationContext, SubschemaConfig } from '@graphql-tools/delegate';
4
4
  import { ObjectValueTransformerMap, ErrorsTransformer } from '../types.js';
@@ -0,0 +1,22 @@
1
+ import { GraphQLSchema } from 'graphql';
2
+ import { ExecutionRequest, ExecutionResult } from '@graphql-tools/utils';
3
+ import { Transform, DelegationContext, SubschemaConfig } from '@graphql-tools/delegate';
4
+ import { LeafValueTransformer } from '../types.cjs';
5
+ export interface MapLeafValuesTransformationContext {
6
+ transformedRequest: ExecutionRequest;
7
+ }
8
+ export default class MapLeafValues<TContext = Record<string, any>> implements Transform<MapLeafValuesTransformationContext, TContext> {
9
+ private readonly inputValueTransformer;
10
+ private readonly outputValueTransformer;
11
+ private readonly resultVisitorMap;
12
+ private originalWrappingSchema;
13
+ private typeInfo;
14
+ constructor(inputValueTransformer: LeafValueTransformer, outputValueTransformer: LeafValueTransformer);
15
+ private _getTypeInfo;
16
+ private _getOriginalWrappingSchema;
17
+ transformSchema(originalWrappingSchema: GraphQLSchema, _subschemaConfig: SubschemaConfig<any, any, any, TContext>, _transformedSchema?: GraphQLSchema): GraphQLSchema;
18
+ transformRequest(originalRequest: ExecutionRequest, _delegationContext: DelegationContext<TContext>, transformationContext: MapLeafValuesTransformationContext): ExecutionRequest;
19
+ transformResult(originalResult: ExecutionResult, _delegationContext: DelegationContext<TContext>, transformationContext: MapLeafValuesTransformationContext): ExecutionResult;
20
+ private transformOperations;
21
+ private transformFieldNode;
22
+ }
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema } from '@graphql-tools/graphql';
1
+ import { GraphQLSchema } from 'graphql';
2
2
  import { ExecutionRequest, ExecutionResult } from '@graphql-tools/utils';
3
3
  import { Transform, DelegationContext, SubschemaConfig } from '@graphql-tools/delegate';
4
4
  import { LeafValueTransformer } from '../types.js';
@@ -0,0 +1,11 @@
1
+ import { GraphQLSchema } from 'graphql';
2
+ import { PruneSchemaOptions } from '@graphql-tools/utils';
3
+ import { SubschemaConfig, Transform } from '@graphql-tools/delegate';
4
+ interface PruneTypesTransformationContext extends Record<string, any> {
5
+ }
6
+ export default class PruneTypes<TContext = Record<string, any>> implements Transform<PruneTypesTransformationContext, TContext> {
7
+ private readonly options;
8
+ constructor(options?: PruneSchemaOptions);
9
+ transformSchema(originalWrappingSchema: GraphQLSchema, _subschemaConfig: SubschemaConfig<any, any, any, TContext>, _transformedSchema?: GraphQLSchema): GraphQLSchema;
10
+ }
11
+ export {};
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema } from '@graphql-tools/graphql';
1
+ import { GraphQLSchema } from 'graphql';
2
2
  import { PruneSchemaOptions } from '@graphql-tools/utils';
3
3
  import { SubschemaConfig, Transform } from '@graphql-tools/delegate';
4
4
  interface PruneTypesTransformationContext extends Record<string, any> {
@@ -0,0 +1,11 @@
1
+ import { GraphQLSchema } from 'graphql';
2
+ import { SubschemaConfig, Transform } from '@graphql-tools/delegate';
3
+ interface RemoveObjectFieldDeprecationsTransformationContext extends Record<string, any> {
4
+ }
5
+ export default class RemoveObjectFieldDeprecations<TContext = Record<string, any>> implements Transform<RemoveObjectFieldDeprecationsTransformationContext, TContext> {
6
+ private readonly removeDirectives;
7
+ private readonly removeDeprecations;
8
+ constructor(reason: string | RegExp);
9
+ transformSchema(originalWrappingSchema: GraphQLSchema, subschemaConfig: SubschemaConfig<any, any, any, TContext>, transformedSchema?: GraphQLSchema): GraphQLSchema;
10
+ }
11
+ export {};
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema } from '@graphql-tools/graphql';
1
+ import { GraphQLSchema } from 'graphql';
2
2
  import { SubschemaConfig, Transform } from '@graphql-tools/delegate';
3
3
  interface RemoveObjectFieldDeprecationsTransformationContext extends Record<string, any> {
4
4
  }
@@ -0,0 +1,10 @@
1
+ import { GraphQLSchema } from 'graphql';
2
+ import { SubschemaConfig, Transform } from '@graphql-tools/delegate';
3
+ interface RemoveObjectFieldDirectivesTransformationContext extends Record<string, any> {
4
+ }
5
+ export default class RemoveObjectFieldDirectives<TContext = Record<string, any>> implements Transform<RemoveObjectFieldDirectivesTransformationContext, TContext> {
6
+ private readonly transformer;
7
+ constructor(directiveName: string | RegExp, args?: Record<string, any>);
8
+ transformSchema(originalWrappingSchema: GraphQLSchema, subschemaConfig: SubschemaConfig<any, any, any, TContext>, transformedSchema?: GraphQLSchema): GraphQLSchema;
9
+ }
10
+ export {};
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema } from '@graphql-tools/graphql';
1
+ import { GraphQLSchema } from 'graphql';
2
2
  import { SubschemaConfig, Transform } from '@graphql-tools/delegate';
3
3
  interface RemoveObjectFieldDirectivesTransformationContext extends Record<string, any> {
4
4
  }