@graphql-tools/batch-delegate 9.0.31 → 9.0.32-alpha-3b2000e3a6b9e871ed2700b7795f23d2a15358ce

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,16 @@
1
1
  # @graphql-tools/batch-delegate
2
2
 
3
+ ## 9.0.32-alpha-3b2000e3a6b9e871ed2700b7795f23d2a15358ce
4
+
5
+ ### Patch Changes
6
+
7
+ - [#726](https://github.com/graphql-hive/gateway/pull/726) [`3b2000e`](https://github.com/graphql-hive/gateway/commit/3b2000e3a6b9e871ed2700b7795f23d2a15358ce) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
8
+
9
+ - Added dependency [`@whatwg-node/promise-helpers@^1.0.0` ↗︎](https://www.npmjs.com/package/@whatwg-node/promise-helpers/v/1.0.0) (to `dependencies`)
10
+
11
+ - Updated dependencies [[`3b2000e`](https://github.com/graphql-hive/gateway/commit/3b2000e3a6b9e871ed2700b7795f23d2a15358ce)]:
12
+ - @graphql-tools/delegate@10.2.14-alpha-3b2000e3a6b9e871ed2700b7795f23d2a15358ce
13
+
3
14
  ## 9.0.31
4
15
 
5
16
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  var delegate = require('@graphql-tools/delegate');
4
4
  var utils = require('@graphql-tools/utils');
5
+ var promiseHelpers = require('@whatwg-node/promise-helpers');
5
6
  var DataLoader = require('dataloader');
6
7
  var graphql = require('graphql');
7
8
 
@@ -15,9 +16,9 @@ function createBatchFn(options) {
15
16
  const fieldName = options.fieldName ?? options.info.fieldName;
16
17
  const { valuesFromResults, lazyOptionsFn } = options;
17
18
  return function batchFn(keys) {
18
- return utils.fakePromise(
19
- utils.mapMaybePromise(
20
- delegate.delegateToSchema({
19
+ return promiseHelpers.fakePromise(
20
+ promiseHelpers.handleMaybePromise(
21
+ () => delegate.delegateToSchema({
21
22
  returnType: new graphql.GraphQLList(
22
23
  graphql.getNamedType(options.returnType || options.info.returnType)
23
24
  ),
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { getActualFieldNodes, delegateToSchema } from '@graphql-tools/delegate';
2
- import { memoize2, memoize1, fakePromise, mapMaybePromise, relocatedError } from '@graphql-tools/utils';
2
+ import { memoize2, memoize1, relocatedError } from '@graphql-tools/utils';
3
+ import { fakePromise, handleMaybePromise } from '@whatwg-node/promise-helpers';
3
4
  import DataLoader from 'dataloader';
4
5
  import { getNamedType, print, GraphQLList } from 'graphql';
5
6
 
@@ -10,8 +11,8 @@ function createBatchFn(options) {
10
11
  const { valuesFromResults, lazyOptionsFn } = options;
11
12
  return function batchFn(keys) {
12
13
  return fakePromise(
13
- mapMaybePromise(
14
- delegateToSchema({
14
+ handleMaybePromise(
15
+ () => delegateToSchema({
15
16
  returnType: new GraphQLList(
16
17
  getNamedType(options.returnType || options.info.returnType)
17
18
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/batch-delegate",
3
- "version": "9.0.31",
3
+ "version": "9.0.32-alpha-3b2000e3a6b9e871ed2700b7795f23d2a15358ce",
4
4
  "type": "module",
5
5
  "description": "A set of utils for faster development of GraphQL tools",
6
6
  "repository": {
@@ -38,15 +38,16 @@
38
38
  "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
39
39
  },
40
40
  "dependencies": {
41
- "@graphql-tools/delegate": "^10.2.13",
41
+ "@graphql-tools/delegate": "10.2.14-alpha-3b2000e3a6b9e871ed2700b7795f23d2a15358ce",
42
42
  "@graphql-tools/utils": "^10.8.1",
43
+ "@whatwg-node/promise-helpers": "^1.0.0",
43
44
  "dataloader": "^2.2.3",
44
45
  "tslib": "^2.8.1"
45
46
  },
46
47
  "devDependencies": {
47
48
  "@graphql-tools/schema": "^10.0.11",
48
49
  "graphql": "^16.9.0",
49
- "pkgroll": "2.10.0"
50
+ "pkgroll": "2.11.0"
50
51
  },
51
52
  "sideEffects": false
52
53
  }