@graphql-tools/stitch 10.3.2 → 11.0.0-alpha-21ea30a5d1ffb13aad5ca0842c40d66e47fc5b9b
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 +28 -0
- package/dist/index.cjs +11 -17
- package/dist/index.js +12 -18
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @graphql-tools/stitch
|
|
2
2
|
|
|
3
|
+
## 11.0.0-alpha-21ea30a5d1ffb13aad5ca0842c40d66e47fc5b9b
|
|
4
|
+
### Major Changes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- [#2670](https://github.com/graphql-hive/gateway/pull/2670) [`65d8347`](https://github.com/graphql-hive/gateway/commit/65d83475672f9a81122a0c1b33834655ff1379e6) 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) [`631ee11`](https://github.com/graphql-hive/gateway/commit/631ee11fd98d3a255815bbfcaccb55edcb2e45ec) 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) [`21ea30a`](https://github.com/graphql-hive/gateway/commit/21ea30a5d1ffb13aad5ca0842c40d66e47fc5b9b) 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 [[`21ea30a`](https://github.com/graphql-hive/gateway/commit/21ea30a5d1ffb13aad5ca0842c40d66e47fc5b9b), [`21ea30a`](https://github.com/graphql-hive/gateway/commit/21ea30a5d1ffb13aad5ca0842c40d66e47fc5b9b), [`21ea30a`](https://github.com/graphql-hive/gateway/commit/21ea30a5d1ffb13aad5ca0842c40d66e47fc5b9b), [`65d8347`](https://github.com/graphql-hive/gateway/commit/65d83475672f9a81122a0c1b33834655ff1379e6), [`631ee11`](https://github.com/graphql-hive/gateway/commit/631ee11fd98d3a255815bbfcaccb55edcb2e45ec)]:
|
|
27
|
+
- @graphql-tools/batch-delegate@11.0.0-alpha-21ea30a5d1ffb13aad5ca0842c40d66e47fc5b9b
|
|
28
|
+
- @graphql-tools/delegate@13.0.0-alpha-21ea30a5d1ffb13aad5ca0842c40d66e47fc5b9b
|
|
29
|
+
- @graphql-tools/wrap@12.0.0-alpha-21ea30a5d1ffb13aad5ca0842c40d66e47fc5b9b
|
|
30
|
+
|
|
3
31
|
## 10.3.2
|
|
4
32
|
### Patch Changes
|
|
5
33
|
|
package/dist/index.cjs
CHANGED
|
@@ -2852,7 +2852,6 @@ function mergeDirectives(directives) {
|
|
|
2852
2852
|
});
|
|
2853
2853
|
}
|
|
2854
2854
|
|
|
2855
|
-
const backcompatOptions = { commentDescriptions: true };
|
|
2856
2855
|
function typeFromAST(node) {
|
|
2857
2856
|
switch (node.kind) {
|
|
2858
2857
|
case graphql.Kind.OBJECT_TYPE_DEFINITION:
|
|
@@ -2876,7 +2875,7 @@ function typeFromAST(node) {
|
|
|
2876
2875
|
function makeObjectType(node) {
|
|
2877
2876
|
const config = {
|
|
2878
2877
|
name: node.name.value,
|
|
2879
|
-
description:
|
|
2878
|
+
description: node.description?.value,
|
|
2880
2879
|
interfaces: () => node.interfaces?.map(
|
|
2881
2880
|
(iface) => utils.createNamedStub(iface.name.value, "interface")
|
|
2882
2881
|
) || [],
|
|
@@ -2888,7 +2887,7 @@ function makeObjectType(node) {
|
|
|
2888
2887
|
function makeInterfaceType(node) {
|
|
2889
2888
|
const config = {
|
|
2890
2889
|
name: node.name.value,
|
|
2891
|
-
description:
|
|
2890
|
+
description: node.description?.value,
|
|
2892
2891
|
interfaces: () => node.interfaces?.map(
|
|
2893
2892
|
(iface) => utils.createNamedStub(iface.name.value, "interface")
|
|
2894
2893
|
),
|
|
@@ -2902,7 +2901,7 @@ function makeEnumType(node) {
|
|
|
2902
2901
|
(prev, value) => ({
|
|
2903
2902
|
...prev,
|
|
2904
2903
|
[value.name.value]: {
|
|
2905
|
-
description:
|
|
2904
|
+
description: value.description?.value,
|
|
2906
2905
|
deprecationReason: getDeprecationReason(value),
|
|
2907
2906
|
astNode: value
|
|
2908
2907
|
}
|
|
@@ -2911,7 +2910,7 @@ function makeEnumType(node) {
|
|
|
2911
2910
|
) ?? {};
|
|
2912
2911
|
return new graphql.GraphQLEnumType({
|
|
2913
2912
|
name: node.name.value,
|
|
2914
|
-
description:
|
|
2913
|
+
description: node.description?.value,
|
|
2915
2914
|
values,
|
|
2916
2915
|
astNode: node
|
|
2917
2916
|
});
|
|
@@ -2919,7 +2918,7 @@ function makeEnumType(node) {
|
|
|
2919
2918
|
function makeUnionType(node) {
|
|
2920
2919
|
return new graphql.GraphQLUnionType({
|
|
2921
2920
|
name: node.name.value,
|
|
2922
|
-
description:
|
|
2921
|
+
description: node.description?.value,
|
|
2923
2922
|
types: () => node.types?.map((type) => utils.createNamedStub(type.name.value, "object")) ?? [],
|
|
2924
2923
|
astNode: node
|
|
2925
2924
|
});
|
|
@@ -2927,17 +2926,14 @@ function makeUnionType(node) {
|
|
|
2927
2926
|
function makeScalarType(node) {
|
|
2928
2927
|
return new graphql.GraphQLScalarType({
|
|
2929
2928
|
name: node.name.value,
|
|
2930
|
-
description:
|
|
2931
|
-
astNode: node
|
|
2932
|
-
// TODO: serialize default property setting can be dropped once
|
|
2933
|
-
// upstream graphql-js TypeScript typings are updated, likely in v16
|
|
2934
|
-
serialize: (value) => value
|
|
2929
|
+
description: node.description?.value,
|
|
2930
|
+
astNode: node
|
|
2935
2931
|
});
|
|
2936
2932
|
}
|
|
2937
2933
|
function makeInputObjectType(node) {
|
|
2938
2934
|
return new graphql.GraphQLInputObjectType({
|
|
2939
2935
|
name: node.name.value,
|
|
2940
|
-
description:
|
|
2936
|
+
description: node.description?.value,
|
|
2941
2937
|
fields: () => node.fields ? makeValues(node.fields) : {},
|
|
2942
2938
|
astNode: node
|
|
2943
2939
|
});
|
|
@@ -2948,7 +2944,7 @@ function makeFields(nodes) {
|
|
|
2948
2944
|
...prev,
|
|
2949
2945
|
[node.name.value]: {
|
|
2950
2946
|
type: utils.createStub(node.type, "output"),
|
|
2951
|
-
description:
|
|
2947
|
+
description: node.description?.value,
|
|
2952
2948
|
args: makeValues(node.arguments ?? []),
|
|
2953
2949
|
deprecationReason: getDeprecationReason(node),
|
|
2954
2950
|
astNode: node
|
|
@@ -2964,7 +2960,7 @@ function makeValues(nodes) {
|
|
|
2964
2960
|
[node.name.value]: {
|
|
2965
2961
|
type: utils.createStub(node.type, "input"),
|
|
2966
2962
|
defaultValue: node.defaultValue !== void 0 ? graphql.valueFromASTUntyped(node.defaultValue) : void 0,
|
|
2967
|
-
description:
|
|
2963
|
+
description: node.description?.value,
|
|
2968
2964
|
astNode: node
|
|
2969
2965
|
}
|
|
2970
2966
|
}),
|
|
@@ -3230,9 +3226,7 @@ function stitchSchemas(options) {
|
|
|
3230
3226
|
}
|
|
3231
3227
|
if (extensions.length > 0) {
|
|
3232
3228
|
const mergedExtensions = graphql.concatAST(extensions);
|
|
3233
|
-
schema$1 = graphql.extendSchema(schema$1, mergedExtensions
|
|
3234
|
-
commentDescriptions: true
|
|
3235
|
-
});
|
|
3229
|
+
schema$1 = graphql.extendSchema(schema$1, mergedExtensions);
|
|
3236
3230
|
}
|
|
3237
3231
|
const resolverMap = cloneResolverMap(
|
|
3238
3232
|
merge.mergeResolvers(resolvers),
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isExternalObject, getVariableValues, handleOverrideByDelegation, 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 { mergeDeep, collectSubFields, memoize3, memoize2, memoize1, parseSelectionSet, collectFields, isSome, getImplementingTypes, getRootTypeNames, filterSchema,
|
|
4
|
+
import { mergeDeep, collectSubFields, memoize3, memoize2, memoize1, parseSelectionSet, collectFields, isSome, getImplementingTypes, getRootTypeNames, filterSchema, createNamedStub, createStub, getRootTypeMap, getRootTypes, inspect, rewireTypes, getOperationASTFromRequest, getDefinedRootType, getArgumentValues } from '@graphql-tools/utils';
|
|
5
5
|
import { handleMaybePromise } from '@whatwg-node/promise-helpers';
|
|
6
6
|
import { getNamedType, Kind, isAbstractType, TypeNameMetaFieldDef, isObjectType, GraphQLList, isLeafType, isInputObjectType, isUnionType, print, isInterfaceType, visit, isScalarType, isCompositeType, isNonNullType, isEnumType, isListType, getNullableType, isNullableType, GraphQLObjectType, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLUnionType, GraphQLEnumType, GraphQLScalarType, GraphQLDirective, valueFromASTUntyped, getDirectiveValues, GraphQLDeprecatedDirective, DirectiveLocation, isNamedType, isIntrospectionType, isDirective, isSpecifiedScalarType, GraphQLSchema, concatAST, extendSchema, specifiedDirectives, isSpecifiedDirective } from 'graphql';
|
|
7
7
|
import { batchDelegateToSchema } from '@graphql-tools/batch-delegate';
|
|
@@ -2850,7 +2850,6 @@ function mergeDirectives(directives) {
|
|
|
2850
2850
|
});
|
|
2851
2851
|
}
|
|
2852
2852
|
|
|
2853
|
-
const backcompatOptions = { commentDescriptions: true };
|
|
2854
2853
|
function typeFromAST(node) {
|
|
2855
2854
|
switch (node.kind) {
|
|
2856
2855
|
case Kind.OBJECT_TYPE_DEFINITION:
|
|
@@ -2874,7 +2873,7 @@ function typeFromAST(node) {
|
|
|
2874
2873
|
function makeObjectType(node) {
|
|
2875
2874
|
const config = {
|
|
2876
2875
|
name: node.name.value,
|
|
2877
|
-
description:
|
|
2876
|
+
description: node.description?.value,
|
|
2878
2877
|
interfaces: () => node.interfaces?.map(
|
|
2879
2878
|
(iface) => createNamedStub(iface.name.value, "interface")
|
|
2880
2879
|
) || [],
|
|
@@ -2886,7 +2885,7 @@ function makeObjectType(node) {
|
|
|
2886
2885
|
function makeInterfaceType(node) {
|
|
2887
2886
|
const config = {
|
|
2888
2887
|
name: node.name.value,
|
|
2889
|
-
description:
|
|
2888
|
+
description: node.description?.value,
|
|
2890
2889
|
interfaces: () => node.interfaces?.map(
|
|
2891
2890
|
(iface) => createNamedStub(iface.name.value, "interface")
|
|
2892
2891
|
),
|
|
@@ -2900,7 +2899,7 @@ function makeEnumType(node) {
|
|
|
2900
2899
|
(prev, value) => ({
|
|
2901
2900
|
...prev,
|
|
2902
2901
|
[value.name.value]: {
|
|
2903
|
-
description:
|
|
2902
|
+
description: value.description?.value,
|
|
2904
2903
|
deprecationReason: getDeprecationReason(value),
|
|
2905
2904
|
astNode: value
|
|
2906
2905
|
}
|
|
@@ -2909,7 +2908,7 @@ function makeEnumType(node) {
|
|
|
2909
2908
|
) ?? {};
|
|
2910
2909
|
return new GraphQLEnumType({
|
|
2911
2910
|
name: node.name.value,
|
|
2912
|
-
description:
|
|
2911
|
+
description: node.description?.value,
|
|
2913
2912
|
values,
|
|
2914
2913
|
astNode: node
|
|
2915
2914
|
});
|
|
@@ -2917,7 +2916,7 @@ function makeEnumType(node) {
|
|
|
2917
2916
|
function makeUnionType(node) {
|
|
2918
2917
|
return new GraphQLUnionType({
|
|
2919
2918
|
name: node.name.value,
|
|
2920
|
-
description:
|
|
2919
|
+
description: node.description?.value,
|
|
2921
2920
|
types: () => node.types?.map((type) => createNamedStub(type.name.value, "object")) ?? [],
|
|
2922
2921
|
astNode: node
|
|
2923
2922
|
});
|
|
@@ -2925,17 +2924,14 @@ function makeUnionType(node) {
|
|
|
2925
2924
|
function makeScalarType(node) {
|
|
2926
2925
|
return new GraphQLScalarType({
|
|
2927
2926
|
name: node.name.value,
|
|
2928
|
-
description:
|
|
2929
|
-
astNode: node
|
|
2930
|
-
// TODO: serialize default property setting can be dropped once
|
|
2931
|
-
// upstream graphql-js TypeScript typings are updated, likely in v16
|
|
2932
|
-
serialize: (value) => value
|
|
2927
|
+
description: node.description?.value,
|
|
2928
|
+
astNode: node
|
|
2933
2929
|
});
|
|
2934
2930
|
}
|
|
2935
2931
|
function makeInputObjectType(node) {
|
|
2936
2932
|
return new GraphQLInputObjectType({
|
|
2937
2933
|
name: node.name.value,
|
|
2938
|
-
description:
|
|
2934
|
+
description: node.description?.value,
|
|
2939
2935
|
fields: () => node.fields ? makeValues(node.fields) : {},
|
|
2940
2936
|
astNode: node
|
|
2941
2937
|
});
|
|
@@ -2946,7 +2942,7 @@ function makeFields(nodes) {
|
|
|
2946
2942
|
...prev,
|
|
2947
2943
|
[node.name.value]: {
|
|
2948
2944
|
type: createStub(node.type, "output"),
|
|
2949
|
-
description:
|
|
2945
|
+
description: node.description?.value,
|
|
2950
2946
|
args: makeValues(node.arguments ?? []),
|
|
2951
2947
|
deprecationReason: getDeprecationReason(node),
|
|
2952
2948
|
astNode: node
|
|
@@ -2962,7 +2958,7 @@ function makeValues(nodes) {
|
|
|
2962
2958
|
[node.name.value]: {
|
|
2963
2959
|
type: createStub(node.type, "input"),
|
|
2964
2960
|
defaultValue: node.defaultValue !== void 0 ? valueFromASTUntyped(node.defaultValue) : void 0,
|
|
2965
|
-
description:
|
|
2961
|
+
description: node.description?.value,
|
|
2966
2962
|
astNode: node
|
|
2967
2963
|
}
|
|
2968
2964
|
}),
|
|
@@ -3228,9 +3224,7 @@ function stitchSchemas(options) {
|
|
|
3228
3224
|
}
|
|
3229
3225
|
if (extensions.length > 0) {
|
|
3230
3226
|
const mergedExtensions = concatAST(extensions);
|
|
3231
|
-
schema = extendSchema(schema, mergedExtensions
|
|
3232
|
-
commentDescriptions: true
|
|
3233
|
-
});
|
|
3227
|
+
schema = extendSchema(schema, mergedExtensions);
|
|
3234
3228
|
}
|
|
3235
3229
|
const resolverMap = cloneResolverMap(
|
|
3236
3230
|
mergeResolvers(resolvers),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-tools/stitch",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0-alpha-21ea30a5d1ffb13aad5ca0842c40d66e47fc5b9b",
|
|
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": ">=
|
|
13
|
+
"node": ">=22.15.0"
|
|
14
14
|
},
|
|
15
15
|
"main": "./dist/index.js",
|
|
16
16
|
"types": "./dist/index.d.ts",
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
"prepack": "yarn build"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"graphql": "^
|
|
38
|
+
"graphql": "^16.0.0 || ^17.0.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@graphql-tools/batch-delegate": "
|
|
42
|
-
"@graphql-tools/delegate": "
|
|
41
|
+
"@graphql-tools/batch-delegate": "11.0.0-alpha-21ea30a5d1ffb13aad5ca0842c40d66e47fc5b9b",
|
|
42
|
+
"@graphql-tools/delegate": "13.0.0-alpha-21ea30a5d1ffb13aad5ca0842c40d66e47fc5b9b",
|
|
43
43
|
"@graphql-tools/executor": "^2.0.1",
|
|
44
44
|
"@graphql-tools/merge": "^9.2.4",
|
|
45
45
|
"@graphql-tools/schema": "^10.1.1",
|
|
46
46
|
"@graphql-tools/utils": "^12.0.1",
|
|
47
|
-
"@graphql-tools/wrap": "
|
|
47
|
+
"@graphql-tools/wrap": "12.0.0-alpha-21ea30a5d1ffb13aad5ca0842c40d66e47fc5b9b",
|
|
48
48
|
"@whatwg-node/promise-helpers": "^1.3.2",
|
|
49
49
|
"tslib": "^2.8.1"
|
|
50
50
|
},
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"array-shuffle": "4.1.0",
|
|
54
54
|
"dataloader": "^2.2.3",
|
|
55
55
|
"graphql": "^16.12.0",
|
|
56
|
-
"graphql-yoga": "
|
|
56
|
+
"graphql-yoga": "6.0.0-alpha-20261019165905-4e993e96c2903cbe3084f9b49dfbf05042e3fe57",
|
|
57
57
|
"pkgroll": "2.27.1"
|
|
58
58
|
},
|
|
59
59
|
"sideEffects": false
|