@graphql-tools/utils 8.9.0-alpha-e651c437.0 → 8.9.1-alpha-62ec7058.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 (114) hide show
  1. package/cjs/addTypes.js +1 -1
  2. package/cjs/astFromType.js +1 -1
  3. package/cjs/astFromValueUntyped.js +1 -1
  4. package/cjs/build-operation-for-field.js +1 -1
  5. package/cjs/collectFields.js +1 -1
  6. package/cjs/comments.js +1 -1
  7. package/cjs/errors.js +1 -1
  8. package/cjs/fields.js +1 -1
  9. package/cjs/filterSchema.js +1 -1
  10. package/cjs/fixSchemaAst.js +1 -1
  11. package/cjs/forEachDefaultValue.js +1 -1
  12. package/cjs/forEachField.js +1 -1
  13. package/cjs/get-fields-with-directives.js +1 -1
  14. package/cjs/get-implementing-types.js +1 -1
  15. package/cjs/getArgumentValues.js +1 -1
  16. package/cjs/getObjectTypeFromTypeMap.js +1 -1
  17. package/cjs/getOperationASTFromRequest.js +1 -1
  18. package/cjs/getResolversFromSchema.js +1 -1
  19. package/cjs/heal.js +2 -1
  20. package/cjs/helpers.js +1 -1
  21. package/cjs/implementsAbstractType.js +1 -1
  22. package/cjs/inspect.js +1 -1
  23. package/cjs/isDocumentNode.js +1 -1
  24. package/cjs/mapSchema.js +1 -1
  25. package/cjs/parse-graphql-json.js +1 -1
  26. package/cjs/parse-graphql-sdl.js +1 -1
  27. package/cjs/print-schema-with-directives.js +1 -1
  28. package/cjs/prune.js +1 -1
  29. package/cjs/renameType.js +1 -1
  30. package/cjs/rewire.js +1 -1
  31. package/cjs/selectionSets.js +1 -1
  32. package/cjs/stub.js +2 -1
  33. package/cjs/transformInputValue.js +1 -1
  34. package/cjs/updateArgument.js +1 -1
  35. package/cjs/validate-documents.js +1 -1
  36. package/cjs/visitResult.js +1 -1
  37. package/esm/addTypes.js +1 -1
  38. package/esm/astFromType.js +1 -1
  39. package/esm/astFromValueUntyped.js +1 -1
  40. package/esm/build-operation-for-field.js +1 -1
  41. package/esm/collectFields.js +1 -1
  42. package/esm/comments.js +1 -1
  43. package/esm/errors.js +1 -1
  44. package/esm/fields.js +1 -1
  45. package/esm/filterSchema.js +1 -1
  46. package/esm/fixSchemaAst.js +1 -1
  47. package/esm/forEachDefaultValue.js +1 -1
  48. package/esm/forEachField.js +1 -1
  49. package/esm/get-fields-with-directives.js +1 -1
  50. package/esm/get-implementing-types.js +1 -1
  51. package/esm/getArgumentValues.js +1 -1
  52. package/esm/getObjectTypeFromTypeMap.js +1 -1
  53. package/esm/getOperationASTFromRequest.js +1 -1
  54. package/esm/getResolversFromSchema.js +1 -1
  55. package/esm/heal.js +2 -1
  56. package/esm/helpers.js +1 -1
  57. package/esm/implementsAbstractType.js +1 -1
  58. package/esm/inspect.js +1 -1
  59. package/esm/isDocumentNode.js +1 -1
  60. package/esm/mapSchema.js +1 -1
  61. package/esm/parse-graphql-json.js +1 -1
  62. package/esm/parse-graphql-sdl.js +1 -1
  63. package/esm/print-schema-with-directives.js +1 -1
  64. package/esm/prune.js +1 -1
  65. package/esm/renameType.js +1 -1
  66. package/esm/rewire.js +1 -1
  67. package/esm/selectionSets.js +1 -1
  68. package/esm/stub.js +2 -1
  69. package/esm/transformInputValue.js +1 -1
  70. package/esm/updateArgument.js +1 -1
  71. package/esm/validate-documents.js +1 -1
  72. package/esm/visitResult.js +1 -1
  73. package/package.json +2 -4
  74. package/typings/Interfaces.d.ts +1 -1
  75. package/typings/addTypes.d.ts +1 -1
  76. package/typings/astFromType.d.ts +1 -1
  77. package/typings/astFromValueUntyped.d.ts +1 -1
  78. package/typings/build-operation-for-field.d.ts +1 -1
  79. package/typings/collectFields.d.ts +1 -1
  80. package/typings/comments.d.ts +1 -1
  81. package/typings/errors.d.ts +1 -1
  82. package/typings/fields.d.ts +1 -1
  83. package/typings/filterSchema.d.ts +1 -1
  84. package/typings/fixSchemaAst.d.ts +1 -1
  85. package/typings/forEachDefaultValue.d.ts +1 -1
  86. package/typings/forEachField.d.ts +1 -1
  87. package/typings/get-directives.d.ts +1 -1
  88. package/typings/get-fields-with-directives.d.ts +1 -1
  89. package/typings/get-implementing-types.d.ts +1 -1
  90. package/typings/getArgumentValues.d.ts +1 -1
  91. package/typings/getObjectTypeFromTypeMap.d.ts +1 -1
  92. package/typings/getOperationASTFromRequest.d.ts +1 -1
  93. package/typings/getResolversFromSchema.d.ts +1 -1
  94. package/typings/getResponseKeyFromInfo.d.ts +1 -1
  95. package/typings/heal.d.ts +1 -1
  96. package/typings/helpers.d.ts +2 -2
  97. package/typings/implementsAbstractType.d.ts +1 -1
  98. package/typings/isDocumentNode.d.ts +1 -1
  99. package/typings/loaders.d.ts +1 -1
  100. package/typings/mapSchema.d.ts +1 -1
  101. package/typings/parse-graphql-json.d.ts +1 -1
  102. package/typings/parse-graphql-sdl.d.ts +1 -1
  103. package/typings/print-schema-with-directives.d.ts +1 -1
  104. package/typings/prune.d.ts +1 -1
  105. package/typings/renameType.d.ts +1 -1
  106. package/typings/rewire.d.ts +1 -1
  107. package/typings/rootTypes.d.ts +1 -1
  108. package/typings/selectionSets.d.ts +1 -1
  109. package/typings/stub.d.ts +1 -1
  110. package/typings/transformInputValue.d.ts +1 -1
  111. package/typings/types.d.ts +1 -1
  112. package/typings/updateArgument.d.ts +1 -1
  113. package/typings/validate-documents.d.ts +2 -2
  114. package/typings/visitResult.d.ts +1 -1
package/cjs/addTypes.js CHANGED
@@ -28,7 +28,7 @@
28
28
  //
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.addTypes = void 0;
31
- const graphql_1 = require("graphql");
31
+ const graphql_1 = require("@graphql-tools/graphql");
32
32
  const getObjectTypeFromTypeMap_js_1 = require("./getObjectTypeFromTypeMap.js");
33
33
  const rewire_js_1 = require("./rewire.js");
34
34
  function addTypes(schema, newTypesOrDirectives) {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.astFromType = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  const inspect_js_1 = require("./inspect.js");
6
6
  function astFromType(type) {
7
7
  if ((0, graphql_1.isNonNullType)(type)) {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.astFromValueUntyped = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  /**
6
6
  * Produces a GraphQL Value AST given a JavaScript object.
7
7
  * Function will match JavaScript/JSON values to GraphQL AST schema format
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildOperationNodeForField = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  const rootTypes_js_1 = require("./rootTypes.js");
6
6
  let operationVariables = [];
7
7
  let fieldTypeMap = new Map();
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.collectSubFields = exports.collectFields = void 0;
4
4
  const memoize_js_1 = require("./memoize.js");
5
- const graphql_1 = require("graphql");
5
+ const graphql_1 = require("@graphql-tools/graphql");
6
6
  // Taken from GraphQL-JS v16 for backwards compat
7
7
  function collectFields(schema, fragments, variableValues, runtimeType, selectionSet, fields, visitedFragmentNames) {
8
8
  for (const selection of selectionSet.selections) {
package/cjs/comments.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getBlockStringIndentation = exports.dedentBlockStringValue = exports.getLeadingCommentBlock = exports.getComment = exports.getDescription = exports.printWithComments = exports.printComment = exports.pushComment = exports.collectComment = exports.resetComments = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  const MAX_LINE_LENGTH = 80;
6
6
  let commentsRegistry = {};
7
7
  function resetComments() {
package/cjs/errors.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.relocatedError = exports.createGraphQLError = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  function createGraphQLError(message, options) {
6
6
  if (graphql_1.versionInfo.major >= 17) {
7
7
  return new graphql_1.GraphQLError(message, options);
package/cjs/fields.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.modifyObjectFields = exports.selectObjectFields = exports.removeObjectFields = exports.appendObjectFields = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  const Interfaces_js_1 = require("./Interfaces.js");
6
6
  const mapSchema_js_1 = require("./mapSchema.js");
7
7
  const addTypes_js_1 = require("./addTypes.js");
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.filterSchema = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  const Interfaces_js_1 = require("./Interfaces.js");
6
6
  const mapSchema_js_1 = require("./mapSchema.js");
7
7
  function filterSchema({ schema, typeFilter = () => true, fieldFilter = undefined, rootFieldFilter = undefined, objectFieldFilter = undefined, interfaceFieldFilter = undefined, inputObjectFieldFilter = undefined, argumentFilter = undefined, }) {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fixSchemaAst = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  const print_schema_with_directives_js_1 = require("./print-schema-with-directives.js");
6
6
  function buildFixedSchema(schema, options) {
7
7
  const document = (0, print_schema_with_directives_js_1.getDocumentNodeFromSchema)(schema);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.forEachDefaultValue = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  function forEachDefaultValue(schema, fn) {
6
6
  const typeMap = schema.getTypeMap();
7
7
  for (const typeName in typeMap) {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.forEachField = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  function forEachField(schema, fn) {
6
6
  const typeMap = schema.getTypeMap();
7
7
  for (const typeName in typeMap) {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getFieldsWithDirectives = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  function parseDirectiveValue(value) {
6
6
  switch (value.kind) {
7
7
  case graphql_1.Kind.INT:
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getImplementingTypes = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  function getImplementingTypes(interfaceName, schema) {
6
6
  const allTypesMap = schema.getTypeMap();
7
7
  const result = [];
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getArgumentValues = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  const errors_js_1 = require("./errors.js");
6
6
  const inspect_js_1 = require("./inspect.js");
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getObjectTypeFromTypeMap = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  function getObjectTypeFromTypeMap(typeMap, type) {
6
6
  if (type) {
7
7
  const maybeObjectType = typeMap[type.name];
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getOperationASTFromRequest = exports.getOperationASTFromDocument = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  const memoize_js_1 = require("./memoize.js");
6
6
  function getOperationASTFromDocument(documentNode, operationName) {
7
7
  const doc = (0, graphql_1.getOperationAST)(documentNode, operationName);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getResolversFromSchema = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  function getResolversFromSchema(schema,
6
6
  // Include default merged resolvers
7
7
  includeDefaultMergedResolver) {
package/cjs/heal.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.healTypes = exports.healSchema = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  // Update any references to named schema types that disagree with the named
6
6
  // types found in schema.getTypeMap().
7
7
  //
@@ -157,6 +157,7 @@ function healTypes(originalTypeMap, directives) {
157
157
  }
158
158
  else if ((0, graphql_1.isNonNullType)(type)) {
159
159
  const healedType = healType(type.ofType);
160
+ // @ts-expect-error TODO: What is going on here?
160
161
  return healedType != null ? new graphql_1.GraphQLNonNull(healedType) : null;
161
162
  }
162
163
  else if ((0, graphql_1.isNamedType)(type)) {
package/cjs/helpers.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.assertSome = exports.isSome = exports.compareNodes = exports.nodeToString = exports.compareStrings = exports.isValidPath = exports.isDocumentString = exports.asArray = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  const asArray = (fns) => (Array.isArray(fns) ? fns : fns ? [fns] : []);
6
6
  exports.asArray = asArray;
7
7
  const invalidDocRegex = /\.[a-z0-9]+$/i;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.implementsAbstractType = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  function implementsAbstractType(schema, typeA, typeB) {
6
6
  if (typeB == null || typeA == null) {
7
7
  return false;
package/cjs/inspect.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // https://github.com/graphql/graphql-js/blob/main/src/jsutils/inspect.ts
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.inspect = void 0;
6
- const graphql_1 = require("graphql");
6
+ const graphql_1 = require("@graphql-tools/graphql");
7
7
  const AggregateError_js_1 = require("./AggregateError.js");
8
8
  const MAX_RECURSIVE_DEPTH = 3;
9
9
  /**
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isDocumentNode = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  function isDocumentNode(object) {
6
6
  return object && typeof object === 'object' && 'kind' in object && object.kind === graphql_1.Kind.DOCUMENT;
7
7
  }
package/cjs/mapSchema.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.correctASTNodes = exports.mapSchema = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  const getObjectTypeFromTypeMap_js_1 = require("./getObjectTypeFromTypeMap.js");
6
6
  const Interfaces_js_1 = require("./Interfaces.js");
7
7
  const rewire_js_1 = require("./rewire.js");
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.parseGraphQLJSON = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  function stripBOM(content) {
6
6
  content = content.toString();
7
7
  // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isDescribable = exports.transformCommentsToDescriptions = exports.parseGraphQLSDL = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  const comments_js_1 = require("./comments.js");
6
6
  function parseGraphQLSDL(location, rawSDL, options = {}) {
7
7
  let document;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.makeDirectiveNodes = exports.makeDirectiveNode = exports.makeDeprecatedDirective = exports.astFromEnumValue = exports.astFromInputField = exports.astFromField = exports.astFromScalarType = exports.astFromEnumType = exports.astFromInputObjectType = exports.astFromUnionType = exports.astFromInterfaceType = exports.astFromObjectType = exports.astFromArg = exports.getDeprecatableDirectiveNodes = exports.getDirectiveNodes = exports.astFromDirective = exports.astFromSchema = exports.printSchemaWithDirectives = exports.getDocumentNodeFromSchema = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  const astFromType_js_1 = require("./astFromType.js");
6
6
  const get_directives_js_1 = require("./get-directives.js");
7
7
  const astFromValueUntyped_js_1 = require("./astFromValueUntyped.js");
package/cjs/prune.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.pruneSchema = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  const mapSchema_js_1 = require("./mapSchema.js");
6
6
  const Interfaces_js_1 = require("./Interfaces.js");
7
7
  const rootTypes_js_1 = require("./rootTypes.js");
package/cjs/renameType.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.renameType = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  function renameType(type, newTypeName) {
6
6
  if ((0, graphql_1.isObjectType)(type)) {
7
7
  return new graphql_1.GraphQLObjectType({
package/cjs/rewire.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.rewireTypes = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  const stub_js_1 = require("./stub.js");
6
6
  function rewireTypes(originalTypeMap, directives) {
7
7
  const referenceTypeMap = Object.create(null);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.parseSelectionSet = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  function parseSelectionSet(selectionSet, options) {
6
6
  const query = (0, graphql_1.parse)(selectionSet, options).definitions[0];
7
7
  return query.selectionSet;
package/cjs/stub.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getBuiltInForStub = exports.isNamedStub = exports.createStub = exports.createNamedStub = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  function createNamedStub(name, type) {
6
6
  let constructor;
7
7
  if (type === 'object') {
@@ -28,6 +28,7 @@ function createStub(node, type) {
28
28
  case graphql_1.Kind.LIST_TYPE:
29
29
  return new graphql_1.GraphQLList(createStub(node.type, type));
30
30
  case graphql_1.Kind.NON_NULL_TYPE:
31
+ // @ts-expect-error TODO: What is going on here?
31
32
  return new graphql_1.GraphQLNonNull(createStub(node.type, type));
32
33
  default:
33
34
  if (type === 'output') {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.parseInputValueLiteral = exports.parseInputValue = exports.serializeInputValue = exports.transformInputValue = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  function transformInputValue(type, value, inputLeafValueTransformer = null, inputObjectValueTransformer = null) {
6
6
  if (value == null) {
7
7
  return value;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createVariableNameGenerator = exports.updateArgument = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  const astFromType_js_1 = require("./astFromType.js");
6
6
  function updateArgument(argumentNodes, variableDefinitionsMap, variableValues, argName, varName, type, value) {
7
7
  argumentNodes[argName] = {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createDefaultRules = exports.checkValidationErrors = exports.validateGraphQlDocuments = void 0;
4
- const graphql_1 = require("graphql");
4
+ const graphql_1 = require("@graphql-tools/graphql");
5
5
  const AggregateError_js_1 = require("./AggregateError.js");
6
6
  async function validateGraphQlDocuments(schema, documentFiles, effectiveRules = createDefaultRules()) {
7
7
  const allFragmentMap = new Map();
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.visitResult = exports.visitErrors = exports.visitData = void 0;
4
4
  const getOperationASTFromRequest_js_1 = require("./getOperationASTFromRequest.js");
5
- const graphql_1 = require("graphql");
5
+ const graphql_1 = require("@graphql-tools/graphql");
6
6
  const collectFields_js_1 = require("./collectFields.js");
7
7
  function visitData(data, enter, leave) {
8
8
  if (Array.isArray(data)) {
package/esm/addTypes.js CHANGED
@@ -25,7 +25,7 @@
25
25
  //
26
26
  // enhanceSchema can fill this gap by adding an additional round of rewiring.
27
27
  //
28
- import { GraphQLSchema, isNamedType, isDirective } from 'graphql';
28
+ import { GraphQLSchema, isNamedType, isDirective } from '@graphql-tools/graphql';
29
29
  import { getObjectTypeFromTypeMap } from './getObjectTypeFromTypeMap.js';
30
30
  import { rewireTypes } from './rewire.js';
31
31
  export function addTypes(schema, newTypesOrDirectives) {
@@ -1,4 +1,4 @@
1
- import { isNonNullType, Kind, isListType } from 'graphql';
1
+ import { isNonNullType, Kind, isListType } from '@graphql-tools/graphql';
2
2
  import { inspect } from './inspect.js';
3
3
  export function astFromType(type) {
4
4
  if (isNonNullType(type)) {
@@ -1,4 +1,4 @@
1
- import { Kind } from 'graphql';
1
+ import { Kind } from '@graphql-tools/graphql';
2
2
  /**
3
3
  * Produces a GraphQL Value AST given a JavaScript object.
4
4
  * Function will match JavaScript/JSON values to GraphQL AST schema format
@@ -1,4 +1,4 @@
1
- import { isObjectType, getNamedType, isUnionType, isNonNullType, isScalarType, isListType, isInterfaceType, isEnumType, Kind, } from 'graphql';
1
+ import { isObjectType, getNamedType, isUnionType, isNonNullType, isScalarType, isListType, isInterfaceType, isEnumType, Kind, } from '@graphql-tools/graphql';
2
2
  import { getDefinedRootType, getRootTypeNames } from './rootTypes.js';
3
3
  let operationVariables = [];
4
4
  let fieldTypeMap = new Map();
@@ -1,5 +1,5 @@
1
1
  import { memoize5 } from './memoize.js';
2
- import { Kind, getDirectiveValues, GraphQLSkipDirective, GraphQLIncludeDirective, isAbstractType, typeFromAST, } from 'graphql';
2
+ import { Kind, getDirectiveValues, GraphQLSkipDirective, GraphQLIncludeDirective, isAbstractType, typeFromAST, } from '@graphql-tools/graphql';
3
3
  // Taken from GraphQL-JS v16 for backwards compat
4
4
  export function collectFields(schema, fragments, variableValues, runtimeType, selectionSet, fields, visitedFragmentNames) {
5
5
  for (const selection of selectionSet.selections) {
package/esm/comments.js CHANGED
@@ -1,4 +1,4 @@
1
- import { visit, TokenKind, } from 'graphql';
1
+ import { visit, TokenKind, } from '@graphql-tools/graphql';
2
2
  const MAX_LINE_LENGTH = 80;
3
3
  let commentsRegistry = {};
4
4
  export function resetComments() {
package/esm/errors.js CHANGED
@@ -1,4 +1,4 @@
1
- import { GraphQLError, versionInfo } from 'graphql';
1
+ import { GraphQLError, versionInfo } from '@graphql-tools/graphql';
2
2
  export function createGraphQLError(message, options) {
3
3
  if (versionInfo.major >= 17) {
4
4
  return new GraphQLError(message, options);
package/esm/fields.js CHANGED
@@ -1,4 +1,4 @@
1
- import { GraphQLObjectType } from 'graphql';
1
+ import { GraphQLObjectType } from '@graphql-tools/graphql';
2
2
  import { MapperKind } from './Interfaces.js';
3
3
  import { mapSchema, correctASTNodes } from './mapSchema.js';
4
4
  import { addTypes } from './addTypes.js';
@@ -1,4 +1,4 @@
1
- import { GraphQLInputObjectType, GraphQLInterfaceType, GraphQLObjectType, } from 'graphql';
1
+ import { GraphQLInputObjectType, GraphQLInterfaceType, GraphQLObjectType, } from '@graphql-tools/graphql';
2
2
  import { MapperKind } from './Interfaces.js';
3
3
  import { mapSchema } from './mapSchema.js';
4
4
  export function filterSchema({ schema, typeFilter = () => true, fieldFilter = undefined, rootFieldFilter = undefined, objectFieldFilter = undefined, interfaceFieldFilter = undefined, inputObjectFieldFilter = undefined, argumentFilter = undefined, }) {
@@ -1,4 +1,4 @@
1
- import { buildASTSchema } from 'graphql';
1
+ import { buildASTSchema } from '@graphql-tools/graphql';
2
2
  import { getDocumentNodeFromSchema } from './print-schema-with-directives.js';
3
3
  function buildFixedSchema(schema, options) {
4
4
  const document = getDocumentNodeFromSchema(schema);
@@ -1,4 +1,4 @@
1
- import { getNamedType, isObjectType, isInputObjectType } from 'graphql';
1
+ import { getNamedType, isObjectType, isInputObjectType } from '@graphql-tools/graphql';
2
2
  export function forEachDefaultValue(schema, fn) {
3
3
  const typeMap = schema.getTypeMap();
4
4
  for (const typeName in typeMap) {
@@ -1,4 +1,4 @@
1
- import { getNamedType, isObjectType } from 'graphql';
1
+ import { getNamedType, isObjectType } from '@graphql-tools/graphql';
2
2
  export function forEachField(schema, fn) {
3
3
  const typeMap = schema.getTypeMap();
4
4
  for (const typeName in typeMap) {
@@ -1,4 +1,4 @@
1
- import { Kind, } from 'graphql';
1
+ import { Kind, } from '@graphql-tools/graphql';
2
2
  function parseDirectiveValue(value) {
3
3
  switch (value.kind) {
4
4
  case Kind.INT:
@@ -1,4 +1,4 @@
1
- import { isObjectType } from 'graphql';
1
+ import { isObjectType } from '@graphql-tools/graphql';
2
2
  export function getImplementingTypes(interfaceName, schema) {
3
3
  const allTypesMap = schema.getTypeMap();
4
4
  const result = [];
@@ -1,4 +1,4 @@
1
- import { valueFromAST, isNonNullType, Kind, print, } from 'graphql';
1
+ import { valueFromAST, isNonNullType, Kind, print, } from '@graphql-tools/graphql';
2
2
  import { createGraphQLError } from './errors.js';
3
3
  import { inspect } from './inspect.js';
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { isObjectType } from 'graphql';
1
+ import { isObjectType } from '@graphql-tools/graphql';
2
2
  export function getObjectTypeFromTypeMap(typeMap, type) {
3
3
  if (type) {
4
4
  const maybeObjectType = typeMap[type.name];
@@ -1,4 +1,4 @@
1
- import { getOperationAST } from 'graphql';
1
+ import { getOperationAST } from '@graphql-tools/graphql';
2
2
  import { memoize1 } from './memoize.js';
3
3
  export function getOperationASTFromDocument(documentNode, operationName) {
4
4
  const doc = getOperationAST(documentNode, operationName);
@@ -1,4 +1,4 @@
1
- import { GraphQLScalarType, isScalarType, isEnumType, isInterfaceType, isUnionType, isObjectType, isSpecifiedScalarType, } from 'graphql';
1
+ import { GraphQLScalarType, isScalarType, isEnumType, isInterfaceType, isUnionType, isObjectType, isSpecifiedScalarType, } from '@graphql-tools/graphql';
2
2
  export function getResolversFromSchema(schema,
3
3
  // Include default merged resolvers
4
4
  includeDefaultMergedResolver) {
package/esm/heal.js CHANGED
@@ -1,4 +1,4 @@
1
- import { GraphQLList, GraphQLNonNull, isNamedType, isObjectType, isInterfaceType, isUnionType, isInputObjectType, isLeafType, isListType, isNonNullType, } from 'graphql';
1
+ import { GraphQLList, GraphQLNonNull, isNamedType, isObjectType, isInterfaceType, isUnionType, isInputObjectType, isLeafType, isListType, isNonNullType, } from '@graphql-tools/graphql';
2
2
  // Update any references to named schema types that disagree with the named
3
3
  // types found in schema.getTypeMap().
4
4
  //
@@ -153,6 +153,7 @@ export function healTypes(originalTypeMap, directives) {
153
153
  }
154
154
  else if (isNonNullType(type)) {
155
155
  const healedType = healType(type.ofType);
156
+ // @ts-expect-error TODO: What is going on here?
156
157
  return healedType != null ? new GraphQLNonNull(healedType) : null;
157
158
  }
158
159
  else if (isNamedType(type)) {
package/esm/helpers.js CHANGED
@@ -1,4 +1,4 @@
1
- import { parse } from 'graphql';
1
+ import { parse } from '@graphql-tools/graphql';
2
2
  export const asArray = (fns) => (Array.isArray(fns) ? fns : fns ? [fns] : []);
3
3
  const invalidDocRegex = /\.[a-z0-9]+$/i;
4
4
  export function isDocumentString(str) {
@@ -1,4 +1,4 @@
1
- import { doTypesOverlap, isCompositeType } from 'graphql';
1
+ import { doTypesOverlap, isCompositeType } from '@graphql-tools/graphql';
2
2
  export function implementsAbstractType(schema, typeA, typeB) {
3
3
  if (typeB == null || typeA == null) {
4
4
  return false;
package/esm/inspect.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // Taken from graphql-js
2
2
  // https://github.com/graphql/graphql-js/blob/main/src/jsutils/inspect.ts
3
- import { GraphQLError } from 'graphql';
3
+ import { GraphQLError } from '@graphql-tools/graphql';
4
4
  import { isAggregateError } from './AggregateError.js';
5
5
  const MAX_RECURSIVE_DEPTH = 3;
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { Kind } from 'graphql';
1
+ import { Kind } from '@graphql-tools/graphql';
2
2
  export function isDocumentNode(object) {
3
3
  return object && typeof object === 'object' && 'kind' in object && object.kind === Kind.DOCUMENT;
4
4
  }
package/esm/mapSchema.js CHANGED
@@ -1,4 +1,4 @@
1
- import { GraphQLObjectType, GraphQLSchema, isInterfaceType, isEnumType, isObjectType, isScalarType, isUnionType, isInputObjectType, GraphQLInputObjectType, GraphQLInterfaceType, isLeafType, isListType, isNonNullType, isNamedType, GraphQLList, GraphQLNonNull, GraphQLEnumType, Kind, } from 'graphql';
1
+ import { GraphQLObjectType, GraphQLSchema, isInterfaceType, isEnumType, isObjectType, isScalarType, isUnionType, isInputObjectType, GraphQLInputObjectType, GraphQLInterfaceType, isLeafType, isListType, isNonNullType, isNamedType, GraphQLList, GraphQLNonNull, GraphQLEnumType, Kind, } from '@graphql-tools/graphql';
2
2
  import { getObjectTypeFromTypeMap } from './getObjectTypeFromTypeMap.js';
3
3
  import { MapperKind, } from './Interfaces.js';
4
4
  import { rewireTypes } from './rewire.js';
@@ -1,4 +1,4 @@
1
- import { buildClientSchema } from 'graphql';
1
+ import { buildClientSchema } from '@graphql-tools/graphql';
2
2
  function stripBOM(content) {
3
3
  content = content.toString();
4
4
  // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
@@ -1,4 +1,4 @@
1
- import { Kind, parse, Source as GraphQLSource, visit, isTypeSystemDefinitionNode, print, } from 'graphql';
1
+ import { Kind, parse, Source as GraphQLSource, visit, isTypeSystemDefinitionNode, print, } from '@graphql-tools/graphql';
2
2
  import { dedentBlockStringValue, getLeadingCommentBlock } from './comments.js';
3
3
  export function parseGraphQLSDL(location, rawSDL, options = {}) {
4
4
  let document;
@@ -1,4 +1,4 @@
1
- import { print, Kind, isSpecifiedScalarType, isIntrospectionType, isSpecifiedDirective, astFromValue, GraphQLDeprecatedDirective, isObjectType, isInterfaceType, isUnionType, isInputObjectType, isEnumType, isScalarType, } from 'graphql';
1
+ import { print, Kind, isSpecifiedScalarType, isIntrospectionType, isSpecifiedDirective, astFromValue, GraphQLDeprecatedDirective, isObjectType, isInterfaceType, isUnionType, isInputObjectType, isEnumType, isScalarType, } from '@graphql-tools/graphql';
2
2
  import { astFromType } from './astFromType.js';
3
3
  import { getDirectivesInExtensions } from './get-directives.js';
4
4
  import { astFromValueUntyped } from './astFromValueUntyped.js';
package/esm/prune.js CHANGED
@@ -1,4 +1,4 @@
1
- import { getNamedType, isObjectType, isInterfaceType, isUnionType, isInputObjectType, isSpecifiedScalarType, isScalarType, } from 'graphql';
1
+ import { getNamedType, isObjectType, isInterfaceType, isUnionType, isInputObjectType, isSpecifiedScalarType, isScalarType, } from '@graphql-tools/graphql';
2
2
  import { mapSchema } from './mapSchema.js';
3
3
  import { MapperKind } from './Interfaces.js';
4
4
  import { getRootTypes } from './rootTypes.js';
package/esm/renameType.js CHANGED
@@ -1,4 +1,4 @@
1
- import { GraphQLEnumType, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLObjectType, GraphQLScalarType, GraphQLUnionType, isEnumType, isInterfaceType, isInputObjectType, isObjectType, isScalarType, isUnionType, } from 'graphql';
1
+ import { GraphQLEnumType, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLObjectType, GraphQLScalarType, GraphQLUnionType, isEnumType, isInterfaceType, isInputObjectType, isObjectType, isScalarType, isUnionType, } from '@graphql-tools/graphql';
2
2
  export function renameType(type, newTypeName) {
3
3
  if (isObjectType(type)) {
4
4
  return new GraphQLObjectType({
package/esm/rewire.js CHANGED
@@ -1,4 +1,4 @@
1
- import { GraphQLDirective, GraphQLEnumType, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLList, GraphQLObjectType, GraphQLNonNull, GraphQLScalarType, GraphQLUnionType, isInterfaceType, isEnumType, isInputObjectType, isListType, isNamedType, isNonNullType, isObjectType, isScalarType, isUnionType, isSpecifiedScalarType, isSpecifiedDirective, } from 'graphql';
1
+ import { GraphQLDirective, GraphQLEnumType, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLList, GraphQLObjectType, GraphQLNonNull, GraphQLScalarType, GraphQLUnionType, isInterfaceType, isEnumType, isInputObjectType, isListType, isNamedType, isNonNullType, isObjectType, isScalarType, isUnionType, isSpecifiedScalarType, isSpecifiedDirective, } from '@graphql-tools/graphql';
2
2
  import { getBuiltInForStub, isNamedStub } from './stub.js';
3
3
  export function rewireTypes(originalTypeMap, directives) {
4
4
  const referenceTypeMap = Object.create(null);
@@ -1,4 +1,4 @@
1
- import { parse } from 'graphql';
1
+ import { parse } from '@graphql-tools/graphql';
2
2
  export function parseSelectionSet(selectionSet, options) {
3
3
  const query = parse(selectionSet, options).definitions[0];
4
4
  return query.selectionSet;
package/esm/stub.js CHANGED
@@ -1,4 +1,4 @@
1
- import { GraphQLObjectType, GraphQLInterfaceType, GraphQLInputObjectType, GraphQLString, GraphQLInt, GraphQLFloat, GraphQLBoolean, GraphQLID, Kind, GraphQLList, GraphQLNonNull, } from 'graphql';
1
+ import { GraphQLObjectType, GraphQLInterfaceType, GraphQLInputObjectType, GraphQLString, GraphQLInt, GraphQLFloat, GraphQLBoolean, GraphQLID, Kind, GraphQLList, GraphQLNonNull, } from '@graphql-tools/graphql';
2
2
  export function createNamedStub(name, type) {
3
3
  let constructor;
4
4
  if (type === 'object') {
@@ -24,6 +24,7 @@ export function createStub(node, type) {
24
24
  case Kind.LIST_TYPE:
25
25
  return new GraphQLList(createStub(node.type, type));
26
26
  case Kind.NON_NULL_TYPE:
27
+ // @ts-expect-error TODO: What is going on here?
27
28
  return new GraphQLNonNull(createStub(node.type, type));
28
29
  default:
29
30
  if (type === 'output') {
@@ -1,4 +1,4 @@
1
- import { getNullableType, isLeafType, isListType, isInputObjectType } from 'graphql';
1
+ import { getNullableType, isLeafType, isListType, isInputObjectType } from '@graphql-tools/graphql';
2
2
  export function transformInputValue(type, value, inputLeafValueTransformer = null, inputObjectValueTransformer = null) {
3
3
  if (value == null) {
4
4
  return value;
@@ -1,4 +1,4 @@
1
- import { Kind } from 'graphql';
1
+ import { Kind } from '@graphql-tools/graphql';
2
2
  import { astFromType } from './astFromType.js';
3
3
  export function updateArgument(argumentNodes, variableDefinitionsMap, variableValues, argName, varName, type, value) {
4
4
  argumentNodes[argName] = {
@@ -1,4 +1,4 @@
1
- import { Kind, validate, specifiedRules, concatAST, versionInfo, } from 'graphql';
1
+ import { Kind, validate, specifiedRules, concatAST, versionInfo, } from '@graphql-tools/graphql';
2
2
  import { AggregateError } from './AggregateError.js';
3
3
  export async function validateGraphQlDocuments(schema, documentFiles, effectiveRules = createDefaultRules()) {
4
4
  const allFragmentMap = new Map();
@@ -1,5 +1,5 @@
1
1
  import { getOperationASTFromRequest } from './getOperationASTFromRequest.js';
2
- import { Kind, isListType, getNullableType, isAbstractType, isObjectType, TypeNameMetaFieldDef, SchemaMetaFieldDef, } from 'graphql';
2
+ import { Kind, isListType, getNullableType, isAbstractType, isObjectType, TypeNameMetaFieldDef, SchemaMetaFieldDef, } from '@graphql-tools/graphql';
3
3
  import { collectFields, collectSubFields } from './collectFields.js';
4
4
  export function visitData(data, enter, leave) {
5
5
  if (Array.isArray(data)) {
package/package.json CHANGED
@@ -1,12 +1,10 @@
1
1
  {
2
2
  "name": "@graphql-tools/utils",
3
- "version": "8.9.0-alpha-e651c437.0",
3
+ "version": "8.9.1-alpha-62ec7058.0",
4
4
  "description": "Common package containing utils and types for GraphQL tools",
5
5
  "sideEffects": false,
6
- "peerDependencies": {
7
- "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
8
- },
9
6
  "dependencies": {
7
+ "@graphql-tools/graphql": "0.1.0-alpha-62ec7058.0",
10
8
  "tslib": "^2.4.0"
11
9
  },
12
10
  "repository": {
@@ -1,4 +1,4 @@
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';
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-tools/graphql';
2
2
  export declare type ExecutionResult<TData = Record<string, any>> = GraphQLExecutionResult & {
3
3
  data?: TData | null;
4
4
  extensions?: Record<string, any>;
@@ -1,2 +1,2 @@
1
- import { GraphQLSchema, GraphQLNamedType, GraphQLDirective } from 'graphql';
1
+ import { GraphQLSchema, GraphQLNamedType, GraphQLDirective } from '@graphql-tools/graphql';
2
2
  export declare function addTypes(schema: GraphQLSchema, newTypesOrDirectives: Array<GraphQLNamedType | GraphQLDirective>): GraphQLSchema;
@@ -1,2 +1,2 @@
1
- import { GraphQLType, TypeNode } from 'graphql';
1
+ import { GraphQLType, TypeNode } from '@graphql-tools/graphql';
2
2
  export declare function astFromType(type: GraphQLType): TypeNode;
@@ -1,4 +1,4 @@
1
- import { ValueNode } from 'graphql';
1
+ import { ValueNode } from '@graphql-tools/graphql';
2
2
  /**
3
3
  * Produces a GraphQL Value AST given a JavaScript object.
4
4
  * Function will match JavaScript/JSON values to GraphQL AST schema format
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema, OperationDefinitionNode, OperationTypeNode } from 'graphql';
1
+ import { GraphQLSchema, OperationDefinitionNode, OperationTypeNode } from '@graphql-tools/graphql';
2
2
  export declare type Skip = string[];
3
3
  export declare type Force = string[];
4
4
  export declare type Ignore = string[];
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema, FragmentDefinitionNode, GraphQLObjectType, SelectionSetNode, FieldNode } from 'graphql';
1
+ import { GraphQLSchema, FragmentDefinitionNode, GraphQLObjectType, SelectionSetNode, FieldNode } from '@graphql-tools/graphql';
2
2
  export declare function collectFields(schema: GraphQLSchema, fragments: Record<string, FragmentDefinitionNode>, variableValues: {
3
3
  [variable: string]: unknown;
4
4
  }, runtimeType: GraphQLObjectType, selectionSet: SelectionSetNode, fields: Map<string, Array<FieldNode>>, visitedFragmentNames: Set<string>): Map<string, Array<FieldNode>>;
@@ -1,4 +1,4 @@
1
- import { StringValueNode, ASTNode, NameNode, DefinitionNode, Location } from 'graphql';
1
+ import { StringValueNode, ASTNode, NameNode, DefinitionNode, Location } from '@graphql-tools/graphql';
2
2
  export declare type NamedDefinitionNode = DefinitionNode & {
3
3
  name?: NameNode;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { ASTNode, GraphQLError, Source } from 'graphql';
1
+ import { ASTNode, GraphQLError, Source } from '@graphql-tools/graphql';
2
2
  import { Maybe } from './types.js';
3
3
  interface GraphQLErrorOptions {
4
4
  nodes?: ReadonlyArray<ASTNode> | ASTNode | null;
@@ -1,4 +1,4 @@
1
- import { GraphQLFieldConfigMap, GraphQLFieldConfig, GraphQLSchema } from 'graphql';
1
+ import { GraphQLFieldConfigMap, GraphQLFieldConfig, GraphQLSchema } from '@graphql-tools/graphql';
2
2
  export declare function appendObjectFields(schema: GraphQLSchema, typeName: string, additionalFields: GraphQLFieldConfigMap<any, any>): GraphQLSchema;
3
3
  export declare function removeObjectFields(schema: GraphQLSchema, typeName: string, testFn: (fieldName: string, field: GraphQLFieldConfig<any, any>) => boolean): [GraphQLSchema, GraphQLFieldConfigMap<any, any>];
4
4
  export declare function selectObjectFields(schema: GraphQLSchema, typeName: string, testFn: (fieldName: string, field: GraphQLFieldConfig<any, any>) => boolean): GraphQLFieldConfigMap<any, any>;
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema } from 'graphql';
1
+ import { GraphQLSchema } from '@graphql-tools/graphql';
2
2
  import { FieldFilter, RootFieldFilter, TypeFilter, ArgumentFilter } from './Interfaces.js';
3
3
  export declare function filterSchema({ schema, typeFilter, fieldFilter, rootFieldFilter, objectFieldFilter, interfaceFieldFilter, inputObjectFieldFilter, argumentFilter, }: {
4
4
  schema: GraphQLSchema;
@@ -1,3 +1,3 @@
1
- import { GraphQLSchema, BuildSchemaOptions } from 'graphql';
1
+ import { GraphQLSchema, BuildSchemaOptions } from '@graphql-tools/graphql';
2
2
  import { SchemaPrintOptions } from './types.js';
3
3
  export declare function fixSchemaAst(schema: GraphQLSchema, options: BuildSchemaOptions & SchemaPrintOptions): GraphQLSchema;
@@ -1,3 +1,3 @@
1
- import { GraphQLSchema } from 'graphql';
1
+ import { GraphQLSchema } from '@graphql-tools/graphql';
2
2
  import { IDefaultValueIteratorFn } from './Interfaces.js';
3
3
  export declare function forEachDefaultValue(schema: GraphQLSchema, fn: IDefaultValueIteratorFn): void;
@@ -1,3 +1,3 @@
1
- import { GraphQLSchema } from 'graphql';
1
+ import { GraphQLSchema } from '@graphql-tools/graphql';
2
2
  import { IFieldIteratorFn } from './Interfaces.js';
3
3
  export declare function forEachField(schema: GraphQLSchema, fn: IFieldIteratorFn): void;
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema, GraphQLNamedType, GraphQLField, GraphQLInputField, GraphQLFieldConfig, GraphQLInputFieldConfig, GraphQLSchemaConfig, GraphQLObjectTypeConfig, GraphQLInterfaceTypeConfig, GraphQLUnionTypeConfig, GraphQLScalarTypeConfig, GraphQLEnumTypeConfig, GraphQLInputObjectTypeConfig, GraphQLEnumValue, GraphQLEnumValueConfig } from 'graphql';
1
+ import { GraphQLSchema, GraphQLNamedType, GraphQLField, GraphQLInputField, GraphQLFieldConfig, GraphQLInputFieldConfig, GraphQLSchemaConfig, GraphQLObjectTypeConfig, GraphQLInterfaceTypeConfig, GraphQLUnionTypeConfig, GraphQLScalarTypeConfig, GraphQLEnumTypeConfig, GraphQLInputObjectTypeConfig, GraphQLEnumValue, GraphQLEnumValueConfig } from '@graphql-tools/graphql';
2
2
  export interface DirectiveAnnotation {
3
3
  name: string;
4
4
  args?: Record<string, any>;
@@ -1,4 +1,4 @@
1
- import { DocumentNode } from 'graphql';
1
+ import { DocumentNode } from '@graphql-tools/graphql';
2
2
  export declare type DirectiveArgs = {
3
3
  [name: string]: any;
4
4
  };
@@ -1,2 +1,2 @@
1
- import { GraphQLSchema } from 'graphql';
1
+ import { GraphQLSchema } from '@graphql-tools/graphql';
2
2
  export declare function getImplementingTypes(interfaceName: string, schema: GraphQLSchema): string[];
@@ -1,4 +1,4 @@
1
- import { GraphQLField, GraphQLDirective, DirectiveNode, FieldNode } from 'graphql';
1
+ import { GraphQLField, GraphQLDirective, DirectiveNode, FieldNode } from '@graphql-tools/graphql';
2
2
  /**
3
3
  * Prepares an object map of argument values given a list of argument
4
4
  * definitions and list of argument AST nodes.
@@ -1,3 +1,3 @@
1
- import { GraphQLNamedType, GraphQLObjectType } from 'graphql';
1
+ import { GraphQLNamedType, GraphQLObjectType } from '@graphql-tools/graphql';
2
2
  import { Maybe } from './types.js';
3
3
  export declare function getObjectTypeFromTypeMap(typeMap: Record<string, GraphQLNamedType>, type: Maybe<GraphQLObjectType>): GraphQLObjectType | undefined;
@@ -1,4 +1,4 @@
1
- import { DocumentNode, OperationDefinitionNode } from 'graphql';
1
+ import { DocumentNode, OperationDefinitionNode } from '@graphql-tools/graphql';
2
2
  import { ExecutionRequest } from './Interfaces.js';
3
3
  export declare function getOperationASTFromDocument(documentNode: DocumentNode, operationName?: string): OperationDefinitionNode;
4
4
  export declare const getOperationASTFromRequest: (request: ExecutionRequest) => OperationDefinitionNode;
@@ -1,3 +1,3 @@
1
- import { GraphQLSchema } from 'graphql';
1
+ import { GraphQLSchema } from '@graphql-tools/graphql';
2
2
  import { IResolvers } from './Interfaces.js';
3
3
  export declare function getResolversFromSchema(schema: GraphQLSchema, includeDefaultMergedResolver?: boolean): IResolvers;
@@ -1,4 +1,4 @@
1
- import { GraphQLResolveInfo } from 'graphql';
1
+ import { GraphQLResolveInfo } from '@graphql-tools/graphql';
2
2
  /**
3
3
  * Get the key under which the result of this resolver will be placed in the response JSON. Basically, just
4
4
  * resolves aliases.
package/typings/heal.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { GraphQLDirective, GraphQLNamedType, GraphQLSchema } from 'graphql';
1
+ import { GraphQLDirective, GraphQLNamedType, GraphQLSchema } from '@graphql-tools/graphql';
2
2
  export declare function healSchema(schema: GraphQLSchema): GraphQLSchema;
3
3
  export declare function healTypes(originalTypeMap: Record<string, GraphQLNamedType | null>, directives: ReadonlyArray<GraphQLDirective>): void;
@@ -1,8 +1,8 @@
1
- import { ASTNode } from 'graphql';
1
+ import { ASTNode } from '@graphql-tools/graphql';
2
2
  export declare const asArray: <T>(fns: T | T[]) => T[];
3
3
  export declare function isDocumentString(str: any): boolean;
4
4
  export declare function isValidPath(str: any): boolean;
5
- export declare function compareStrings<A, B>(a: A, b: B): 1 | -1 | 0;
5
+ export declare function compareStrings<A, B>(a: A, b: B): 1 | 0 | -1;
6
6
  export declare function nodeToString(a: ASTNode): string;
7
7
  export declare function compareNodes(a: ASTNode, b: ASTNode, customFn?: (a: any, b: any) => number): number;
8
8
  export declare function isSome<T>(input: T): input is Exclude<T, null | undefined>;
@@ -1,3 +1,3 @@
1
- import { GraphQLType, GraphQLSchema } from 'graphql';
1
+ import { GraphQLType, GraphQLSchema } from '@graphql-tools/graphql';
2
2
  import { Maybe } from './types.js';
3
3
  export declare function implementsAbstractType(schema: GraphQLSchema, typeA: Maybe<GraphQLType>, typeB: Maybe<GraphQLType>): boolean;
@@ -1,2 +1,2 @@
1
- import { DocumentNode } from 'graphql';
1
+ import { DocumentNode } from '@graphql-tools/graphql';
2
2
  export declare function isDocumentNode(object: any): object is DocumentNode;
@@ -1,4 +1,4 @@
1
- import { DocumentNode, GraphQLSchema, BuildSchemaOptions } from 'graphql';
1
+ import { DocumentNode, GraphQLSchema, BuildSchemaOptions } from '@graphql-tools/graphql';
2
2
  import { GraphQLParseOptions } from './Interfaces.js';
3
3
  export interface Source {
4
4
  document?: DocumentNode;
@@ -1,4 +1,4 @@
1
- import { GraphQLObjectType, GraphQLSchema, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLEnumType } from 'graphql';
1
+ import { GraphQLObjectType, GraphQLSchema, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLEnumType } from '@graphql-tools/graphql';
2
2
  import { SchemaMapper } from './Interfaces.js';
3
3
  export declare function mapSchema(schema: GraphQLSchema, schemaMapper?: SchemaMapper): GraphQLSchema;
4
4
  export declare function correctASTNodes(type: GraphQLObjectType): GraphQLObjectType;
@@ -1,4 +1,4 @@
1
- import { ParseOptions } from 'graphql';
1
+ import { ParseOptions } from '@graphql-tools/graphql';
2
2
  import { Source } from './loaders.js';
3
3
  import { SchemaPrintOptions } from './types.js';
4
4
  export declare function parseGraphQLJSON(location: string, jsonContent: string, options: SchemaPrintOptions & ParseOptions): Source;
@@ -1,4 +1,4 @@
1
- import { DocumentNode, ASTNode, StringValueNode } from 'graphql';
1
+ import { DocumentNode, ASTNode, StringValueNode } from '@graphql-tools/graphql';
2
2
  import { GraphQLParseOptions } from './Interfaces.js';
3
3
  export declare function parseGraphQLSDL(location: string | undefined, rawSDL: string, options?: GraphQLParseOptions): {
4
4
  location: string | undefined;
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema, GraphQLNamedType, DirectiveNode, FieldDefinitionNode, InputValueDefinitionNode, GraphQLArgument, EnumValueDefinitionNode, GraphQLDirective, DirectiveDefinitionNode, SchemaDefinitionNode, SchemaExtensionNode, GraphQLObjectType, ObjectTypeDefinitionNode, GraphQLField, GraphQLInterfaceType, InterfaceTypeDefinitionNode, UnionTypeDefinitionNode, GraphQLUnionType, GraphQLInputObjectType, InputObjectTypeDefinitionNode, GraphQLInputField, GraphQLEnumType, GraphQLEnumValue, EnumTypeDefinitionNode, GraphQLScalarType, ScalarTypeDefinitionNode, DocumentNode } from 'graphql';
1
+ import { GraphQLSchema, GraphQLNamedType, DirectiveNode, FieldDefinitionNode, InputValueDefinitionNode, GraphQLArgument, EnumValueDefinitionNode, GraphQLDirective, DirectiveDefinitionNode, SchemaDefinitionNode, SchemaExtensionNode, GraphQLObjectType, ObjectTypeDefinitionNode, GraphQLField, GraphQLInterfaceType, InterfaceTypeDefinitionNode, UnionTypeDefinitionNode, GraphQLUnionType, GraphQLInputObjectType, InputObjectTypeDefinitionNode, GraphQLInputField, GraphQLEnumType, GraphQLEnumValue, EnumTypeDefinitionNode, GraphQLScalarType, ScalarTypeDefinitionNode, DocumentNode } from '@graphql-tools/graphql';
2
2
  import { GetDocumentNodeFromSchemaOptions, PrintSchemaWithDirectivesOptions, Maybe } from './types.js';
3
3
  export declare function getDocumentNodeFromSchema(schema: GraphQLSchema, options?: GetDocumentNodeFromSchemaOptions): DocumentNode;
4
4
  export declare function printSchemaWithDirectives(schema: GraphQLSchema, options?: PrintSchemaWithDirectivesOptions): string;
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema } from 'graphql';
1
+ import { GraphQLSchema } from '@graphql-tools/graphql';
2
2
  import { PruneSchemaOptions } from './types.js';
3
3
  /**
4
4
  * Prunes the provided schema, removing unused and empty types
@@ -1,4 +1,4 @@
1
- import { GraphQLEnumType, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLObjectType, GraphQLNamedType, GraphQLScalarType, GraphQLUnionType } from 'graphql';
1
+ import { GraphQLEnumType, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLObjectType, GraphQLNamedType, GraphQLScalarType, GraphQLUnionType } from '@graphql-tools/graphql';
2
2
  export declare function renameType(type: GraphQLObjectType, newTypeName: string): GraphQLObjectType;
3
3
  export declare function renameType(type: GraphQLInterfaceType, newTypeName: string): GraphQLInterfaceType;
4
4
  export declare function renameType(type: GraphQLUnionType, newTypeName: string): GraphQLUnionType;
@@ -1,4 +1,4 @@
1
- import { GraphQLDirective, GraphQLNamedType } from 'graphql';
1
+ import { GraphQLDirective, GraphQLNamedType } from '@graphql-tools/graphql';
2
2
  export declare function rewireTypes(originalTypeMap: Record<string, GraphQLNamedType | null>, directives: ReadonlyArray<GraphQLDirective>): {
3
3
  typeMap: Record<string, GraphQLNamedType>;
4
4
  directives: Array<GraphQLDirective>;
@@ -1,4 +1,4 @@
1
- import { GraphQLObjectType, GraphQLSchema, OperationTypeNode } from 'graphql';
1
+ import { GraphQLObjectType, GraphQLSchema, OperationTypeNode } from '@graphql-tools/graphql';
2
2
  export declare function getDefinedRootType(schema: GraphQLSchema, operation: OperationTypeNode): GraphQLObjectType;
3
3
  export declare const getRootTypeNames: (schema: GraphQLSchema) => Set<string>;
4
4
  export declare const getRootTypes: (schema: GraphQLSchema) => Set<GraphQLObjectType>;
@@ -1,3 +1,3 @@
1
- import { SelectionSetNode } from 'graphql';
1
+ import { SelectionSetNode } from '@graphql-tools/graphql';
2
2
  import { GraphQLParseOptions } from './Interfaces.js';
3
3
  export declare function parseSelectionSet(selectionSet: string, options?: GraphQLParseOptions): SelectionSetNode;
package/typings/stub.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { GraphQLObjectType, GraphQLInterfaceType, GraphQLInputObjectType, GraphQLNamedType, TypeNode, GraphQLType, GraphQLOutputType, GraphQLInputType } from 'graphql';
1
+ import { GraphQLObjectType, GraphQLInterfaceType, GraphQLInputObjectType, GraphQLNamedType, TypeNode, GraphQLType, GraphQLOutputType, GraphQLInputType } from '@graphql-tools/graphql';
2
2
  export declare function createNamedStub(name: string, type: 'object'): GraphQLObjectType;
3
3
  export declare function createNamedStub(name: string, type: 'interface'): GraphQLInterfaceType;
4
4
  export declare function createNamedStub(name: string, type: 'input'): GraphQLInputObjectType;
@@ -1,4 +1,4 @@
1
- import { GraphQLInputType } from 'graphql';
1
+ import { GraphQLInputType } from '@graphql-tools/graphql';
2
2
  import { InputLeafValueTransformer, InputObjectValueTransformer, Maybe } from './types.js';
3
3
  export declare function transformInputValue(type: GraphQLInputType, value: any, inputLeafValueTransformer?: Maybe<InputLeafValueTransformer>, inputObjectValueTransformer?: Maybe<InputObjectValueTransformer>): any;
4
4
  export declare function serializeInputValue(type: GraphQLInputType, value: any): any;
@@ -1,4 +1,4 @@
1
- import { GraphQLEnumType, GraphQLInputObjectType, GraphQLNamedType, GraphQLScalarType, visit } from 'graphql';
1
+ import { GraphQLEnumType, GraphQLInputObjectType, GraphQLNamedType, GraphQLScalarType, visit } from '@graphql-tools/graphql';
2
2
  export interface SchemaPrintOptions {
3
3
  /**
4
4
  * Descriptions are defined as preceding string literals, however an older
@@ -1,3 +1,3 @@
1
- import { GraphQLInputType, ArgumentNode, VariableDefinitionNode } from 'graphql';
1
+ import { GraphQLInputType, ArgumentNode, VariableDefinitionNode } from '@graphql-tools/graphql';
2
2
  export declare function updateArgument(argumentNodes: Record<string, ArgumentNode>, variableDefinitionsMap: Record<string, VariableDefinitionNode>, variableValues: Record<string, any>, argName: string, varName: string, type: GraphQLInputType, value: any): void;
3
3
  export declare function createVariableNameGenerator(variableDefinitionMap: Record<string, VariableDefinitionNode>): (argName: string) => string;
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema, GraphQLError, ValidationContext, ASTVisitor } from 'graphql';
1
+ import { GraphQLSchema, GraphQLError, ValidationContext, ASTVisitor } from '@graphql-tools/graphql';
2
2
  import { Source } from './loaders.js';
3
3
  export declare type ValidationRule = (context: ValidationContext) => ASTVisitor;
4
4
  export interface LoadDocumentError {
@@ -7,4 +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[];
10
+ export declare function createDefaultRules(): import("@graphql-tools/graphql").ValidationRule[];
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema, GraphQLError } from 'graphql';
1
+ import { GraphQLSchema, GraphQLError } from '@graphql-tools/graphql';
2
2
  import { ExecutionRequest, ExecutionResult } from './Interfaces.js';
3
3
  export declare type ValueVisitor = (value: any) => any;
4
4
  export declare type ObjectValueVisitor = {