@graphql-tools/stitch 10.1.3-alpha-4c999ac0d70efa3d27c561c791717b0c8699829a → 10.1.3-alpha-adaa10582d0a9c4ee2090bfef2e8be763cf753ea
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 +5 -5
- package/dist/index.cjs +3 -19
- package/dist/index.js +4 -20
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @graphql-tools/stitch
|
|
2
2
|
|
|
3
|
-
## 10.1.3-alpha-
|
|
3
|
+
## 10.1.3-alpha-adaa10582d0a9c4ee2090bfef2e8be763cf753ea
|
|
4
4
|
### Patch Changes
|
|
5
5
|
|
|
6
6
|
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
- Updated dependency [`@graphql-tools/merge@^9.1.5` ↗︎](https://www.npmjs.com/package/@graphql-tools/merge/v/9.1.5) (from `^9.1.3`, in `dependencies`)
|
|
12
12
|
- Updated dependency [`@graphql-tools/schema@^10.0.29` ↗︎](https://www.npmjs.com/package/@graphql-tools/schema/v/10.0.29) (from `^10.0.27`, in `dependencies`)
|
|
13
13
|
- Updated dependency [`@graphql-tools/utils@^10.10.3` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.10.3) (from `^10.10.1`, in `dependencies`)
|
|
14
|
-
- Updated dependencies [[`7ecaf7e`](https://github.com/graphql-hive/gateway/commit/7ecaf7e8f658c4e4c1a91d1e8db3c1a8ceca51cb), [`7ecaf7e`](https://github.com/graphql-hive/gateway/commit/7ecaf7e8f658c4e4c1a91d1e8db3c1a8ceca51cb), [`7ecaf7e`](https://github.com/graphql-hive/gateway/commit/7ecaf7e8f658c4e4c1a91d1e8db3c1a8ceca51cb)
|
|
15
|
-
- @graphql-tools/batch-delegate@10.0.5-alpha-
|
|
16
|
-
- @graphql-tools/delegate@
|
|
17
|
-
- @graphql-tools/wrap@11.
|
|
14
|
+
- Updated dependencies [[`7ecaf7e`](https://github.com/graphql-hive/gateway/commit/7ecaf7e8f658c4e4c1a91d1e8db3c1a8ceca51cb), [`7ecaf7e`](https://github.com/graphql-hive/gateway/commit/7ecaf7e8f658c4e4c1a91d1e8db3c1a8ceca51cb), [`7ecaf7e`](https://github.com/graphql-hive/gateway/commit/7ecaf7e8f658c4e4c1a91d1e8db3c1a8ceca51cb)]:
|
|
15
|
+
- @graphql-tools/batch-delegate@10.0.5-alpha-adaa10582d0a9c4ee2090bfef2e8be763cf753ea
|
|
16
|
+
- @graphql-tools/delegate@11.1.3-alpha-adaa10582d0a9c4ee2090bfef2e8be763cf753ea
|
|
17
|
+
- @graphql-tools/wrap@11.0.5-alpha-adaa10582d0a9c4ee2090bfef2e8be763cf753ea
|
|
18
18
|
|
|
19
19
|
## 10.1.2
|
|
20
20
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -3217,15 +3217,7 @@ function createStitchingExecutor(stitchedSchema) {
|
|
|
3217
3217
|
);
|
|
3218
3218
|
const data = {};
|
|
3219
3219
|
for (const [fieldName, fieldNodes] of fields) {
|
|
3220
|
-
const
|
|
3221
|
-
if (!fieldNode) {
|
|
3222
|
-
continue;
|
|
3223
|
-
}
|
|
3224
|
-
const fieldInstance = rootType.getFields()[fieldName];
|
|
3225
|
-
if (!fieldInstance) {
|
|
3226
|
-
continue;
|
|
3227
|
-
}
|
|
3228
|
-
const responseKey = fieldNode.alias?.value ?? fieldName;
|
|
3220
|
+
const responseKey = fieldNodes[0]?.alias?.value ?? fieldName;
|
|
3229
3221
|
const subschemaForField = subschemas.find((subschema) => {
|
|
3230
3222
|
const subschemaSchema = delegate.isSubschemaConfig(subschema) ? subschema.schema : subschema;
|
|
3231
3223
|
const rootType2 = utils.getDefinedRootType(
|
|
@@ -3234,15 +3226,9 @@ function createStitchingExecutor(stitchedSchema) {
|
|
|
3234
3226
|
);
|
|
3235
3227
|
return rootType2.getFields()[fieldName] != null;
|
|
3236
3228
|
});
|
|
3237
|
-
const args = utils.getArgumentValues(
|
|
3238
|
-
fieldInstance,
|
|
3239
|
-
fieldNode,
|
|
3240
|
-
executorRequest.variables
|
|
3241
|
-
);
|
|
3242
3229
|
let result = await delegate.delegateToSchema({
|
|
3243
3230
|
schema: subschemaForField || stitchedSchema,
|
|
3244
3231
|
rootValue: executorRequest.rootValue,
|
|
3245
|
-
args,
|
|
3246
3232
|
context: executorRequest.context,
|
|
3247
3233
|
info: {
|
|
3248
3234
|
schema: stitchedSchema,
|
|
@@ -3251,10 +3237,8 @@ function createStitchingExecutor(stitchedSchema) {
|
|
|
3251
3237
|
operation,
|
|
3252
3238
|
fragments,
|
|
3253
3239
|
parentType: rootType,
|
|
3254
|
-
returnType:
|
|
3255
|
-
variableValues: executorRequest.variables
|
|
3256
|
-
rootValue: executorRequest.rootValue,
|
|
3257
|
-
path: { typename: void 0, key: responseKey, prev: void 0 }
|
|
3240
|
+
returnType: rootType.getFields()[fieldName]?.type,
|
|
3241
|
+
variableValues: executorRequest.variables
|
|
3258
3242
|
}
|
|
3259
3243
|
});
|
|
3260
3244
|
if (Array.isArray(result)) {
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { handleOverrideByDelegation as handleOverrideByDelegation$1, subtractSelectionSets, extractUnavailableFields, leftOverByDelegationPlan, extractUnavailableFieldsFromSelectionSet, delegateToSchema, cloneSubschemaConfig, isSubschemaConfig, defaultMergedResolver, Subschema } from '@graphql-tools/delegate';
|
|
2
2
|
import { mergeType, mergeInputType, mergeInterface, mergeUnion, mergeEnum, mergeScalar, mergeTypeDefs, mergeResolvers, mergeExtensions, applyExtensions } from '@graphql-tools/merge';
|
|
3
3
|
import { extendResolversFromInterfaces, addResolversToSchema, assertResolversPresent, makeExecutableSchema } from '@graphql-tools/schema';
|
|
4
|
-
import { memoize3, collectSubFields, memoize2, memoize1, parseSelectionSet, collectFields, isSome, getImplementingTypes, getRootTypeNames, filterSchema, mergeDeep, getDescription, createNamedStub, createStub, getRootTypeMap, getRootTypes, inspect, rewireTypes, getOperationASTFromRequest, getDefinedRootType
|
|
4
|
+
import { memoize3, collectSubFields, memoize2, memoize1, parseSelectionSet, collectFields, isSome, getImplementingTypes, getRootTypeNames, filterSchema, mergeDeep, getDescription, createNamedStub, createStub, getRootTypeMap, getRootTypes, inspect, rewireTypes, getOperationASTFromRequest, getDefinedRootType } from '@graphql-tools/utils';
|
|
5
5
|
import { isAbstractType, Kind, TypeNameMetaFieldDef, getNamedType, GraphQLList, isLeafType, isInputObjectType, isUnionType, print, isObjectType, isInterfaceType, visit, isScalarType, isCompositeType, isNonNullType, isEnumType, isListType, getNullableType, isNullableType, GraphQLObjectType, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLUnionType, GraphQLEnumType, GraphQLScalarType, GraphQLDirective, valueFromASTUntyped, getDirectiveValues, GraphQLDeprecatedDirective, DirectiveLocation, isNamedType, isIntrospectionType, isDirective, isSpecifiedScalarType, specifiedDirectives, GraphQLSchema, extendSchema } from 'graphql';
|
|
6
6
|
import { handleMaybePromise } from '@whatwg-node/promise-helpers';
|
|
7
7
|
import { batchDelegateToSchema } from '@graphql-tools/batch-delegate';
|
|
@@ -3215,15 +3215,7 @@ function createStitchingExecutor(stitchedSchema) {
|
|
|
3215
3215
|
);
|
|
3216
3216
|
const data = {};
|
|
3217
3217
|
for (const [fieldName, fieldNodes] of fields) {
|
|
3218
|
-
const
|
|
3219
|
-
if (!fieldNode) {
|
|
3220
|
-
continue;
|
|
3221
|
-
}
|
|
3222
|
-
const fieldInstance = rootType.getFields()[fieldName];
|
|
3223
|
-
if (!fieldInstance) {
|
|
3224
|
-
continue;
|
|
3225
|
-
}
|
|
3226
|
-
const responseKey = fieldNode.alias?.value ?? fieldName;
|
|
3218
|
+
const responseKey = fieldNodes[0]?.alias?.value ?? fieldName;
|
|
3227
3219
|
const subschemaForField = subschemas.find((subschema) => {
|
|
3228
3220
|
const subschemaSchema = isSubschemaConfig(subschema) ? subschema.schema : subschema;
|
|
3229
3221
|
const rootType2 = getDefinedRootType(
|
|
@@ -3232,15 +3224,9 @@ function createStitchingExecutor(stitchedSchema) {
|
|
|
3232
3224
|
);
|
|
3233
3225
|
return rootType2.getFields()[fieldName] != null;
|
|
3234
3226
|
});
|
|
3235
|
-
const args = getArgumentValues(
|
|
3236
|
-
fieldInstance,
|
|
3237
|
-
fieldNode,
|
|
3238
|
-
executorRequest.variables
|
|
3239
|
-
);
|
|
3240
3227
|
let result = await delegateToSchema({
|
|
3241
3228
|
schema: subschemaForField || stitchedSchema,
|
|
3242
3229
|
rootValue: executorRequest.rootValue,
|
|
3243
|
-
args,
|
|
3244
3230
|
context: executorRequest.context,
|
|
3245
3231
|
info: {
|
|
3246
3232
|
schema: stitchedSchema,
|
|
@@ -3249,10 +3235,8 @@ function createStitchingExecutor(stitchedSchema) {
|
|
|
3249
3235
|
operation,
|
|
3250
3236
|
fragments,
|
|
3251
3237
|
parentType: rootType,
|
|
3252
|
-
returnType:
|
|
3253
|
-
variableValues: executorRequest.variables
|
|
3254
|
-
rootValue: executorRequest.rootValue,
|
|
3255
|
-
path: { typename: void 0, key: responseKey, prev: void 0 }
|
|
3238
|
+
returnType: rootType.getFields()[fieldName]?.type,
|
|
3239
|
+
variableValues: executorRequest.variables
|
|
3256
3240
|
}
|
|
3257
3241
|
});
|
|
3258
3242
|
if (Array.isArray(result)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-tools/stitch",
|
|
3
|
-
"version": "10.1.3-alpha-
|
|
3
|
+
"version": "10.1.3-alpha-adaa10582d0a9c4ee2090bfef2e8be763cf753ea",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A set of utils for faster development of GraphQL tools",
|
|
6
6
|
"repository": {
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@graphql-tools/batch-delegate": "10.0.5-alpha-
|
|
42
|
-
"@graphql-tools/delegate": "
|
|
41
|
+
"@graphql-tools/batch-delegate": "10.0.5-alpha-adaa10582d0a9c4ee2090bfef2e8be763cf753ea",
|
|
42
|
+
"@graphql-tools/delegate": "11.1.3-alpha-adaa10582d0a9c4ee2090bfef2e8be763cf753ea",
|
|
43
43
|
"@graphql-tools/executor": "^1.4.13",
|
|
44
44
|
"@graphql-tools/merge": "^9.1.5",
|
|
45
45
|
"@graphql-tools/schema": "^10.0.29",
|
|
46
46
|
"@graphql-tools/utils": "^10.10.3",
|
|
47
|
-
"@graphql-tools/wrap": "11.
|
|
47
|
+
"@graphql-tools/wrap": "11.0.5-alpha-adaa10582d0a9c4ee2090bfef2e8be763cf753ea",
|
|
48
48
|
"@whatwg-node/promise-helpers": "^1.3.2",
|
|
49
49
|
"tslib": "^2.8.1"
|
|
50
50
|
},
|