@graphql-tools/batch-delegate 10.0.20 → 10.0.21-alpha-b715150301d3411ec96be2aac3c9bd1c3254e536
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 +10 -0
- package/dist/index.cjs +3 -3
- package/dist/index.js +3 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @graphql-tools/batch-delegate
|
|
2
2
|
|
|
3
|
+
## 10.0.21-alpha-b715150301d3411ec96be2aac3c9bd1c3254e536
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- [#2273](https://github.com/graphql-hive/gateway/pull/2273) [`5ec0367`](https://github.com/graphql-hive/gateway/commit/5ec0367e9f98207d0f61ba87e7d9c660533808c9) Thanks [@ardatan](https://github.com/ardatan)! - Support additional type definitions, resolvers and custom type merging configuration in Rust Query Planner mode
|
|
9
|
+
|
|
10
|
+
- Updated dependencies [[`5ec0367`](https://github.com/graphql-hive/gateway/commit/5ec0367e9f98207d0f61ba87e7d9c660533808c9)]:
|
|
11
|
+
- @graphql-tools/delegate@12.0.15-alpha-b715150301d3411ec96be2aac3c9bd1c3254e536
|
|
12
|
+
|
|
3
13
|
## 10.0.20
|
|
4
14
|
### Patch Changes
|
|
5
15
|
|
package/dist/index.cjs
CHANGED
|
@@ -13,13 +13,13 @@ var DataLoader__default = /*#__PURE__*/_interopDefault(DataLoader);
|
|
|
13
13
|
const DEFAULT_ARGS_FROM_KEYS = (keys) => ({ ids: keys });
|
|
14
14
|
function createBatchFn(options) {
|
|
15
15
|
const argsFromKeys = options.argsFromKeys ?? DEFAULT_ARGS_FROM_KEYS;
|
|
16
|
-
const fieldName = options.fieldName ?? options.info
|
|
16
|
+
const fieldName = options.fieldName ?? options.info?.fieldName;
|
|
17
17
|
const { valuesFromResults, lazyOptionsFn } = options;
|
|
18
18
|
return function batchFn(keys) {
|
|
19
19
|
return promiseHelpers.fakePromise().then(
|
|
20
20
|
() => delegate.delegateToSchema({
|
|
21
21
|
returnType: new graphql.GraphQLList(
|
|
22
|
-
graphql.getNamedType(options.returnType || options.info
|
|
22
|
+
graphql.getNamedType(options.returnType || options.info?.returnType)
|
|
23
23
|
),
|
|
24
24
|
onLocatedError: (originalError) => {
|
|
25
25
|
if (originalError.path == null) {
|
|
@@ -65,7 +65,7 @@ function getLoader(options) {
|
|
|
65
65
|
info,
|
|
66
66
|
fieldName = info.fieldName,
|
|
67
67
|
dataLoaderOptions,
|
|
68
|
-
fieldNodes = info
|
|
68
|
+
fieldNodes = info?.fieldNodes?.[0] && delegate.getActualFieldNodes(info.fieldNodes[0]),
|
|
69
69
|
selectionSet = fieldNodes?.[0]?.selectionSet,
|
|
70
70
|
returnType = info.returnType,
|
|
71
71
|
argsFromKeys = DEFAULT_ARGS_FROM_KEYS,
|
package/dist/index.js
CHANGED
|
@@ -7,13 +7,13 @@ import DataLoader from 'dataloader';
|
|
|
7
7
|
const DEFAULT_ARGS_FROM_KEYS = (keys) => ({ ids: keys });
|
|
8
8
|
function createBatchFn(options) {
|
|
9
9
|
const argsFromKeys = options.argsFromKeys ?? DEFAULT_ARGS_FROM_KEYS;
|
|
10
|
-
const fieldName = options.fieldName ?? options.info
|
|
10
|
+
const fieldName = options.fieldName ?? options.info?.fieldName;
|
|
11
11
|
const { valuesFromResults, lazyOptionsFn } = options;
|
|
12
12
|
return function batchFn(keys) {
|
|
13
13
|
return fakePromise().then(
|
|
14
14
|
() => delegateToSchema({
|
|
15
15
|
returnType: new GraphQLList(
|
|
16
|
-
getNamedType(options.returnType || options.info
|
|
16
|
+
getNamedType(options.returnType || options.info?.returnType)
|
|
17
17
|
),
|
|
18
18
|
onLocatedError: (originalError) => {
|
|
19
19
|
if (originalError.path == null) {
|
|
@@ -59,7 +59,7 @@ function getLoader(options) {
|
|
|
59
59
|
info,
|
|
60
60
|
fieldName = info.fieldName,
|
|
61
61
|
dataLoaderOptions,
|
|
62
|
-
fieldNodes = info
|
|
62
|
+
fieldNodes = info?.fieldNodes?.[0] && getActualFieldNodes(info.fieldNodes[0]),
|
|
63
63
|
selectionSet = fieldNodes?.[0]?.selectionSet,
|
|
64
64
|
returnType = info.returnType,
|
|
65
65
|
argsFromKeys = DEFAULT_ARGS_FROM_KEYS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-tools/batch-delegate",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.21-alpha-b715150301d3411ec96be2aac3c9bd1c3254e536",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A set of utils for faster development of GraphQL tools",
|
|
6
6
|
"repository": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@graphql-tools/delegate": "
|
|
41
|
+
"@graphql-tools/delegate": "12.0.15-alpha-b715150301d3411ec96be2aac3c9bd1c3254e536",
|
|
42
42
|
"@graphql-tools/utils": "^11.0.0",
|
|
43
43
|
"@whatwg-node/promise-helpers": "^1.3.2",
|
|
44
44
|
"dataloader": "^2.2.3",
|