@graphql-tools/delegate 12.3.0 → 13.0.0-alpha-a2e6c6a806cf4d6827e62534eec72d14d4de16d3

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @graphql-tools/delegate
2
2
 
3
+ ## 13.0.0-alpha-a2e6c6a806cf4d6827e62534eec72d14d4de16d3
4
+ ### Major Changes
5
+
6
+
7
+
8
+ - [#2670](https://github.com/graphql-hive/gateway/pull/2670) [`c19d8f3`](https://github.com/graphql-hive/gateway/commit/c19d8f3ac466a21ce5ac34284e7f7b9eb2f822f7) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Drop GraphQL v15 (and older) support. Only GraphQL v16 and v17 are supported now.
9
+
10
+ Upgrade to `graphql@^16` or `graphql@^17`. Hive Gateway packages require `graphql@^16.9.0` or later.
11
+
12
+ `@graphql-tools/stitch` no longer reads legacy `#` comment descriptions (`commentDescriptions`, removed in GraphQL v16) from type definitions; use string descriptions (`"""..."""`) instead.
13
+
14
+
15
+ - [#2670](https://github.com/graphql-hive/gateway/pull/2670) [`62440a6`](https://github.com/graphql-hive/gateway/commit/62440a6142add62420659fc8e95cad228d2f3450) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Drop Node.js 20 support. The minimum supported Node.js version is now 22.15.0.
16
+
17
+ Upgrade to Node.js 22.15.0 or later.
18
+
19
+ ### Patch Changes
20
+
21
+
22
+
23
+ - [#2670](https://github.com/graphql-hive/gateway/pull/2670) [`ee1b3d4`](https://github.com/graphql-hive/gateway/commit/ee1b3d489895e360565b90813b68f84d378707e4) Thanks [@enisdenjo](https://github.com/enisdenjo)! - dependencies updates:
24
+
25
+ - Updated dependency [`graphql@^16.0.0 || ^17.0.0` ↗︎](https://www.npmjs.com/package/graphql/v/16.0.0) (from `^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0`, in `peerDependencies`)
26
+ - Updated dependencies [[`ee1b3d4`](https://github.com/graphql-hive/gateway/commit/ee1b3d489895e360565b90813b68f84d378707e4), [`c19d8f3`](https://github.com/graphql-hive/gateway/commit/c19d8f3ac466a21ce5ac34284e7f7b9eb2f822f7), [`62440a6`](https://github.com/graphql-hive/gateway/commit/62440a6142add62420659fc8e95cad228d2f3450)]:
27
+ - @graphql-tools/batch-execute@11.0.0-alpha-a2e6c6a806cf4d6827e62534eec72d14d4de16d3
28
+
3
29
  ## 12.3.0
4
30
  ### Minor Changes
5
31
 
package/dist/index.cjs CHANGED
@@ -449,21 +449,11 @@ function reportUnpathedErrorsViaNull(unpathedErrors) {
449
449
  if (unreportedErrors.length) {
450
450
  const unreportedError = unreportedErrors[0];
451
451
  if (unreportedErrors.length === 1 && unreportedError) {
452
- return graphql.locatedError(
453
- unreportedError,
454
- void 0,
455
- unreportedError.path
456
- );
452
+ return graphql.locatedError(unreportedError, void 0, unreportedError.path);
457
453
  }
458
454
  return new AggregateError(
459
455
  unreportedErrors.map(
460
- (e) => (
461
- // We cast path as any for GraphQL.js 14 compat
462
- // locatedError path argument must be defined, but it is just forwarded to a constructor that allows a undefined value
463
- // https://github.com/graphql/graphql-js/blob/b4bff0ba9c15c9d7245dd68556e754c41f263289/src/error/locatedError.js#L25
464
- // https://github.com/graphql/graphql-js/blob/b4bff0ba9c15c9d7245dd68556e754c41f263289/src/error/GraphQLError.js#L19
465
- graphql.locatedError(e, void 0, unreportedError?.path)
466
- )
456
+ (e) => graphql.locatedError(e, void 0, unreportedError?.path)
467
457
  ),
468
458
  unreportedErrors.map((error) => error.message).join(", \n")
469
459
  );
@@ -602,7 +592,7 @@ const getTypeInfo = utils.memoize1(function getTypeInfo2(schema) {
602
592
  return new graphql.TypeInfo(schema);
603
593
  });
604
594
  const getTypeInfoWithType = utils.memoize2(function getTypeInfoWithType2(schema, type) {
605
- return graphql.versionInfo.major < 16 ? new graphql.TypeInfo(schema, void 0, type) : new graphql.TypeInfo(schema, type);
595
+ return new graphql.TypeInfo(schema, type);
606
596
  });
607
597
 
608
598
  const handleOverrideByDelegation = utils.memoize3(
package/dist/index.d.cts CHANGED
@@ -253,7 +253,7 @@ type VersionedVariableValues = Record<string, unknown> | VariableValues<Record<s
253
253
  /**
254
254
  * Returns the runtime variable values, regardless of the graphql-js version.
255
255
  *
256
- * - graphql <=16: `info.variableValues` is a flat `{ [name]: value }` map.
256
+ * - graphql 16: `info.variableValues` is a flat `{ [name]: value }` map.
257
257
  * - graphql >=17: `info.variableValues` is `{ sources, coerced }`; the runtime
258
258
  * values live under `.coerced`.
259
259
  */
package/dist/index.d.ts CHANGED
@@ -253,7 +253,7 @@ type VersionedVariableValues = Record<string, unknown> | VariableValues<Record<s
253
253
  /**
254
254
  * Returns the runtime variable values, regardless of the graphql-js version.
255
255
  *
256
- * - graphql <=16: `info.variableValues` is a flat `{ [name]: value }` map.
256
+ * - graphql 16: `info.variableValues` is a flat `{ [name]: value }` map.
257
257
  * - graphql >=17: `info.variableValues` is `{ sources, coerced }`; the runtime
258
258
  * values live under `.coerced`.
259
259
  */
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { memoize2, memoize1, collectFields, relocatedError, mergeDeep, promiseReduce, pathToArray, memoize3, getDefinedRootType, createGraphQLError, implementsAbstractType, getRootTypeNames, astFromArg, astFromValueUntyped, asArray, isAsyncIterable, getOperationASTFromRequest } from '@graphql-tools/utils';
2
2
  export { createDeferred } from '@graphql-tools/utils';
3
- import { GraphQLError, locatedError, isAbstractType, getNullableType, isLeafType, isCompositeType, isListType, responsePathAsArray, Kind, TypeInfo, versionInfo, visit, visitWithTypeInfo, isNullableType, isUnionType, getNamedType, isObjectType, isInterfaceType, typeFromAST, isTypeSubTypeOf, isNonNullType, isInputObjectType, defaultFieldResolver, GraphQLSchema, isSchema, validate } from 'graphql';
3
+ import { GraphQLError, locatedError, isAbstractType, getNullableType, isLeafType, isCompositeType, isListType, responsePathAsArray, Kind, TypeInfo, visit, visitWithTypeInfo, isNullableType, isUnionType, getNamedType, isObjectType, isInterfaceType, typeFromAST, isTypeSubTypeOf, isNonNullType, isInputObjectType, defaultFieldResolver, GraphQLSchema, isSchema, validate } from 'graphql';
4
4
  import { handleMaybePromise, isPromise, fakePromise, createDeferredPromise, mapAsyncIterator } from '@whatwg-node/promise-helpers';
5
5
  import { CRITICAL_ERROR, executorFromSchema } from '@graphql-tools/executor';
6
6
  export { executorFromSchema as createDefaultExecutor } from '@graphql-tools/executor';
@@ -449,21 +449,11 @@ function reportUnpathedErrorsViaNull(unpathedErrors) {
449
449
  if (unreportedErrors.length) {
450
450
  const unreportedError = unreportedErrors[0];
451
451
  if (unreportedErrors.length === 1 && unreportedError) {
452
- return locatedError(
453
- unreportedError,
454
- void 0,
455
- unreportedError.path
456
- );
452
+ return locatedError(unreportedError, void 0, unreportedError.path);
457
453
  }
458
454
  return new AggregateError(
459
455
  unreportedErrors.map(
460
- (e) => (
461
- // We cast path as any for GraphQL.js 14 compat
462
- // locatedError path argument must be defined, but it is just forwarded to a constructor that allows a undefined value
463
- // https://github.com/graphql/graphql-js/blob/b4bff0ba9c15c9d7245dd68556e754c41f263289/src/error/locatedError.js#L25
464
- // https://github.com/graphql/graphql-js/blob/b4bff0ba9c15c9d7245dd68556e754c41f263289/src/error/GraphQLError.js#L19
465
- locatedError(e, void 0, unreportedError?.path)
466
- )
456
+ (e) => locatedError(e, void 0, unreportedError?.path)
467
457
  ),
468
458
  unreportedErrors.map((error) => error.message).join(", \n")
469
459
  );
@@ -602,7 +592,7 @@ const getTypeInfo = memoize1(function getTypeInfo2(schema) {
602
592
  return new TypeInfo(schema);
603
593
  });
604
594
  const getTypeInfoWithType = memoize2(function getTypeInfoWithType2(schema, type) {
605
- return versionInfo.major < 16 ? new TypeInfo(schema, void 0, type) : new TypeInfo(schema, type);
595
+ return new TypeInfo(schema, type);
606
596
  });
607
597
 
608
598
  const handleOverrideByDelegation = memoize3(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/delegate",
3
- "version": "12.3.0",
3
+ "version": "13.0.0-alpha-a2e6c6a806cf4d6827e62534eec72d14d4de16d3",
4
4
  "type": "module",
5
5
  "description": "A set of utils for faster development of GraphQL tools",
6
6
  "repository": {
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "license": "MIT",
12
12
  "engines": {
13
- "node": ">=20.0.0"
13
+ "node": ">=22.15.0"
14
14
  },
15
15
  "main": "./dist/index.js",
16
16
  "types": "./dist/index.d.ts",
@@ -35,10 +35,10 @@
35
35
  "prepack": "yarn build"
36
36
  },
37
37
  "peerDependencies": {
38
- "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
38
+ "graphql": "^16.0.0 || ^17.0.0"
39
39
  },
40
40
  "dependencies": {
41
- "@graphql-tools/batch-execute": "^10.3.0",
41
+ "@graphql-tools/batch-execute": "11.0.0-alpha-a2e6c6a806cf4d6827e62534eec72d14d4de16d3",
42
42
  "@graphql-tools/executor": "^2.0.1",
43
43
  "@graphql-tools/schema": "^10.1.1",
44
44
  "@graphql-tools/utils": "^12.0.1",