@depup/graphql-tools__delegate 12.1.3-depup.0 → 12.2.0-depup.0
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/README.md +3 -6
- package/changes.json +2 -14
- package/dist/index.cjs +30 -4
- package/dist/index.d.cts +16 -3
- package/dist/index.d.ts +16 -3
- package/dist/index.js +29 -6
- package/package.json +8 -20
package/README.md
CHANGED
|
@@ -13,18 +13,15 @@ npm install @depup/graphql-tools__delegate
|
|
|
13
13
|
|
|
14
14
|
| Field | Value |
|
|
15
15
|
|-------|-------|
|
|
16
|
-
| Original | [@graphql-tools/delegate](https://www.npmjs.com/package/@graphql-tools/delegate) @ 12.
|
|
17
|
-
| Processed | 2026-09-
|
|
16
|
+
| Original | [@graphql-tools/delegate](https://www.npmjs.com/package/@graphql-tools/delegate) @ 12.2.0 |
|
|
17
|
+
| Processed | 2026-09-09 |
|
|
18
18
|
| Smoke test | passed |
|
|
19
|
-
| Deps updated |
|
|
19
|
+
| Deps updated | 1 |
|
|
20
20
|
|
|
21
21
|
## Dependency Changes
|
|
22
22
|
|
|
23
23
|
| Dependency | From | To |
|
|
24
24
|
|------------|------|-----|
|
|
25
|
-
| @graphql-tools/executor | ^1.4.13 | ^2.0.0 |
|
|
26
|
-
| @graphql-tools/schema | ^10.0.29 | ^10.1.0 |
|
|
27
|
-
| @graphql-tools/utils | ^11.0.0 | ^12.0.0 |
|
|
28
25
|
| @repeaterjs/repeater | ^3.0.6 | ^3.1.0 |
|
|
29
26
|
|
|
30
27
|
---
|
package/changes.json
CHANGED
|
@@ -1,22 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bumped": {
|
|
3
|
-
"@graphql-tools/executor": {
|
|
4
|
-
"from": "^1.4.13",
|
|
5
|
-
"to": "^2.0.0"
|
|
6
|
-
},
|
|
7
|
-
"@graphql-tools/schema": {
|
|
8
|
-
"from": "^10.0.29",
|
|
9
|
-
"to": "^10.1.0"
|
|
10
|
-
},
|
|
11
|
-
"@graphql-tools/utils": {
|
|
12
|
-
"from": "^11.0.0",
|
|
13
|
-
"to": "^12.0.0"
|
|
14
|
-
},
|
|
15
3
|
"@repeaterjs/repeater": {
|
|
16
4
|
"from": "^3.0.6",
|
|
17
5
|
"to": "^3.1.0"
|
|
18
6
|
}
|
|
19
7
|
},
|
|
20
|
-
"timestamp": "2026-09-
|
|
21
|
-
"totalUpdated":
|
|
8
|
+
"timestamp": "2026-09-09T00:32:43.261Z",
|
|
9
|
+
"totalUpdated": 1
|
|
22
10
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -66,6 +66,15 @@ function getCoercedVariableValues(variableValues) {
|
|
|
66
66
|
}
|
|
67
67
|
return variableValues;
|
|
68
68
|
}
|
|
69
|
+
function getVariableValues(variableValues) {
|
|
70
|
+
if (variableValues != null && Object.hasOwn(variableValues, "coerced") && Object.hasOwn(variableValues, "sources")) {
|
|
71
|
+
return variableValues;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
coerced: variableValues ?? {},
|
|
75
|
+
sources: {}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
69
78
|
|
|
70
79
|
const prototypePollutingKeys = [
|
|
71
80
|
"__proto__",
|
|
@@ -147,7 +156,7 @@ function handleResolverResult(resolverResult, subschema, selectionSet, object, c
|
|
|
147
156
|
const { fields } = utils.collectFields(
|
|
148
157
|
schema,
|
|
149
158
|
info.fragments,
|
|
150
|
-
|
|
159
|
+
getVariableValues(info.variableValues),
|
|
151
160
|
type,
|
|
152
161
|
selectionSet
|
|
153
162
|
);
|
|
@@ -558,7 +567,7 @@ function getResponseKey(info) {
|
|
|
558
567
|
`Data cannot be extracted from result without an explicit key or source schema.`
|
|
559
568
|
);
|
|
560
569
|
}
|
|
561
|
-
return
|
|
570
|
+
return info.fieldNodes[0].alias?.value ?? info.fieldName;
|
|
562
571
|
}
|
|
563
572
|
function getReturnType(info) {
|
|
564
573
|
if (info == null) {
|
|
@@ -2307,6 +2316,20 @@ function removeOverlappingAliases(result) {
|
|
|
2307
2316
|
return result;
|
|
2308
2317
|
}
|
|
2309
2318
|
|
|
2319
|
+
const asyncHelpers = {
|
|
2320
|
+
promiseAll: Promise.all.bind(Promise),
|
|
2321
|
+
track: () => void 0
|
|
2322
|
+
};
|
|
2323
|
+
function getGraphQLResolveInfo(info) {
|
|
2324
|
+
if (info == null || "getAbortSignal" in info && "getAsyncHelpers" in info) {
|
|
2325
|
+
return info;
|
|
2326
|
+
}
|
|
2327
|
+
return Object.assign(info, {
|
|
2328
|
+
getAbortSignal: () => void 0,
|
|
2329
|
+
getAsyncHelpers: () => asyncHelpers
|
|
2330
|
+
});
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2310
2333
|
function getDelegatingOperation(parentType, schema) {
|
|
2311
2334
|
if (parentType === schema.getMutationType()) {
|
|
2312
2335
|
return "mutation";
|
|
@@ -2510,7 +2533,7 @@ function createRequest({
|
|
|
2510
2533
|
rootValue,
|
|
2511
2534
|
operationName: targetOperationName,
|
|
2512
2535
|
context,
|
|
2513
|
-
info,
|
|
2536
|
+
info: getGraphQLResolveInfo(info),
|
|
2514
2537
|
operationType: targetOperation
|
|
2515
2538
|
};
|
|
2516
2539
|
}
|
|
@@ -2556,7 +2579,7 @@ function defaultMergedResolver(parent, args, context, info) {
|
|
|
2556
2579
|
if (!parent) {
|
|
2557
2580
|
return null;
|
|
2558
2581
|
}
|
|
2559
|
-
const responseKey =
|
|
2582
|
+
const responseKey = info.fieldNodes[0].alias?.value ?? info.fieldName;
|
|
2560
2583
|
if (!isExternalObject(parent)) {
|
|
2561
2584
|
return graphql.defaultFieldResolver(parent, args, context, info);
|
|
2562
2585
|
}
|
|
@@ -3550,12 +3573,15 @@ exports.delegateToSchema = delegateToSchema;
|
|
|
3550
3573
|
exports.extractUnavailableFields = extractUnavailableFields;
|
|
3551
3574
|
exports.extractUnavailableFieldsFromSelectionSet = extractUnavailableFieldsFromSelectionSet;
|
|
3552
3575
|
exports.getActualFieldNodes = getActualFieldNodes;
|
|
3576
|
+
exports.getCoercedVariableValues = getCoercedVariableValues;
|
|
3553
3577
|
exports.getDelegatingOperation = getDelegatingOperation;
|
|
3578
|
+
exports.getGraphQLResolveInfo = getGraphQLResolveInfo;
|
|
3554
3579
|
exports.getPlanLeftOverFromParent = getPlanLeftOverFromParent;
|
|
3555
3580
|
exports.getSubschema = getSubschema;
|
|
3556
3581
|
exports.getTypeInfo = getTypeInfo;
|
|
3557
3582
|
exports.getTypeInfoWithType = getTypeInfoWithType;
|
|
3558
3583
|
exports.getUnpathedErrors = getUnpathedErrors;
|
|
3584
|
+
exports.getVariableValues = getVariableValues;
|
|
3559
3585
|
exports.handleOverrideByDelegation = handleOverrideByDelegation;
|
|
3560
3586
|
exports.handleResolverResult = handleResolverResult;
|
|
3561
3587
|
exports.isExternalObject = isExternalObject;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExecutionRequest, ExecutionResult, Executor, Maybe, GraphQLResolveInfo as GraphQLResolveInfo$1 } from '@graphql-tools/utils';
|
|
1
|
+
import { ExecutionRequest, ExecutionResult, Executor, Maybe, VariableValues, GraphQLResolveInfo as GraphQLResolveInfo$1 } from '@graphql-tools/utils';
|
|
2
2
|
export { createDeferred } from '@graphql-tools/utils';
|
|
3
3
|
import * as graphql from 'graphql';
|
|
4
4
|
import { GraphQLSchema, OperationTypeNode, GraphQLResolveInfo, GraphQLOutputType, GraphQLError, SelectionSetNode, GraphQLFieldResolver, FragmentDefinitionNode, FieldNode, GraphQLNamedType, GraphQLObjectType, GraphQLField, GraphQLInterfaceType, SelectionNode, GraphQLNamedOutputType, TypeInfo, GraphQLType } from 'graphql';
|
|
@@ -232,10 +232,23 @@ declare function getPlanLeftOverFromParent(parent: any): DelegationPlanLeftOver
|
|
|
232
232
|
declare const getTypeInfo: (schema: GraphQLSchema) => TypeInfo;
|
|
233
233
|
declare const getTypeInfoWithType: (schema: GraphQLSchema, type: Maybe<GraphQLType>) => TypeInfo;
|
|
234
234
|
|
|
235
|
+
type VersionedVariableValues = Record<string, unknown> | VariableValues<Record<string, unknown>> | undefined;
|
|
236
|
+
/**
|
|
237
|
+
* Returns the runtime variable values, regardless of the graphql-js version.
|
|
238
|
+
*
|
|
239
|
+
* - graphql <=16: `info.variableValues` is a flat `{ [name]: value }` map.
|
|
240
|
+
* - graphql >=17: `info.variableValues` is `{ sources, coerced }`; the runtime
|
|
241
|
+
* values live under `.coerced`.
|
|
242
|
+
*/
|
|
243
|
+
declare function getCoercedVariableValues(variableValues: VersionedVariableValues): Record<string, unknown> | undefined;
|
|
244
|
+
declare function getVariableValues(variableValues: VersionedVariableValues): VariableValues<Record<string, unknown>>;
|
|
245
|
+
|
|
246
|
+
declare function getGraphQLResolveInfo(info: GraphQLResolveInfo | undefined): GraphQLResolveInfo$1 | undefined;
|
|
247
|
+
|
|
235
248
|
declare const prototypePollutingKeys: readonly ["__proto__", "constructor", "prototype"];
|
|
236
249
|
type PrototypePollutingKey = (typeof prototypePollutingKeys)[number];
|
|
237
250
|
declare function isPrototypePollutingKey(key: string): key is PrototypePollutingKey;
|
|
238
251
|
|
|
239
|
-
declare const handleOverrideByDelegation: (info: GraphQLResolveInfo
|
|
252
|
+
declare const handleOverrideByDelegation: (info: GraphQLResolveInfo, context: any, overrideHandler: OverrideHandler) => boolean;
|
|
240
253
|
|
|
241
|
-
export { type BatchingOptions, type CreateProxyingResolverFn, type Deferred, type DelegationContext, type DelegationPlanBuilder, type DelegationPlanLeftOver, EMPTY_OBJECT, type ExternalObject, FIELD_SUBSCHEMA_MAP_SYMBOL, type ICreateProxyingResolverOptions, type ICreateRequest, type IDelegateRequestOptions, type IDelegateToSchemaOptions, type MergedFieldConfig, type MergedTypeConfig, type MergedTypeEntryPoint, type MergedTypeInfo, type MergedTypeResolver, type MergedTypeResolverOptions, OBJECT_SUBSCHEMA_SYMBOL, type OverrideHandler, PLAN_LEFT_OVER, type RequestTransform, type ResultTransform, type SchemaTransform, type StitchingInfo, Subschema, type SubschemaConfig, type Transform, Transformer, UNPATHED_ERRORS_SYMBOL, annotateExternalObject, applySchemaTransforms, cloneSubschemaConfig, createRequest, defaultMergedResolver, delegateRequest, delegateToSchema, extractUnavailableFields, extractUnavailableFieldsFromSelectionSet, getActualFieldNodes, getDelegatingOperation, getPlanLeftOverFromParent, getSubschema, getTypeInfo, getTypeInfoWithType, getUnpathedErrors, handleOverrideByDelegation, handleResolverResult, isExternalObject, isPrototypePollutingKey, isSubschema, isSubschemaConfig, leftOverByDelegationPlan, mergeFields, resolveExternalValue, subtractSelectionSets };
|
|
254
|
+
export { type BatchingOptions, type CreateProxyingResolverFn, type Deferred, type DelegationContext, type DelegationPlanBuilder, type DelegationPlanLeftOver, EMPTY_OBJECT, type ExternalObject, FIELD_SUBSCHEMA_MAP_SYMBOL, type ICreateProxyingResolverOptions, type ICreateRequest, type IDelegateRequestOptions, type IDelegateToSchemaOptions, type MergedFieldConfig, type MergedTypeConfig, type MergedTypeEntryPoint, type MergedTypeInfo, type MergedTypeResolver, type MergedTypeResolverOptions, OBJECT_SUBSCHEMA_SYMBOL, type OverrideHandler, PLAN_LEFT_OVER, type RequestTransform, type ResultTransform, type SchemaTransform, type StitchingInfo, Subschema, type SubschemaConfig, type Transform, Transformer, UNPATHED_ERRORS_SYMBOL, annotateExternalObject, applySchemaTransforms, cloneSubschemaConfig, createRequest, defaultMergedResolver, delegateRequest, delegateToSchema, extractUnavailableFields, extractUnavailableFieldsFromSelectionSet, getActualFieldNodes, getCoercedVariableValues, getDelegatingOperation, getGraphQLResolveInfo, getPlanLeftOverFromParent, getSubschema, getTypeInfo, getTypeInfoWithType, getUnpathedErrors, getVariableValues, handleOverrideByDelegation, handleResolverResult, isExternalObject, isPrototypePollutingKey, isSubschema, isSubschemaConfig, leftOverByDelegationPlan, mergeFields, resolveExternalValue, subtractSelectionSets };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExecutionRequest, ExecutionResult, Executor, Maybe, GraphQLResolveInfo as GraphQLResolveInfo$1 } from '@graphql-tools/utils';
|
|
1
|
+
import { ExecutionRequest, ExecutionResult, Executor, Maybe, VariableValues, GraphQLResolveInfo as GraphQLResolveInfo$1 } from '@graphql-tools/utils';
|
|
2
2
|
export { createDeferred } from '@graphql-tools/utils';
|
|
3
3
|
import * as graphql from 'graphql';
|
|
4
4
|
import { GraphQLSchema, OperationTypeNode, GraphQLResolveInfo, GraphQLOutputType, GraphQLError, SelectionSetNode, GraphQLFieldResolver, FragmentDefinitionNode, FieldNode, GraphQLNamedType, GraphQLObjectType, GraphQLField, GraphQLInterfaceType, SelectionNode, GraphQLNamedOutputType, TypeInfo, GraphQLType } from 'graphql';
|
|
@@ -232,10 +232,23 @@ declare function getPlanLeftOverFromParent(parent: any): DelegationPlanLeftOver
|
|
|
232
232
|
declare const getTypeInfo: (schema: GraphQLSchema) => TypeInfo;
|
|
233
233
|
declare const getTypeInfoWithType: (schema: GraphQLSchema, type: Maybe<GraphQLType>) => TypeInfo;
|
|
234
234
|
|
|
235
|
+
type VersionedVariableValues = Record<string, unknown> | VariableValues<Record<string, unknown>> | undefined;
|
|
236
|
+
/**
|
|
237
|
+
* Returns the runtime variable values, regardless of the graphql-js version.
|
|
238
|
+
*
|
|
239
|
+
* - graphql <=16: `info.variableValues` is a flat `{ [name]: value }` map.
|
|
240
|
+
* - graphql >=17: `info.variableValues` is `{ sources, coerced }`; the runtime
|
|
241
|
+
* values live under `.coerced`.
|
|
242
|
+
*/
|
|
243
|
+
declare function getCoercedVariableValues(variableValues: VersionedVariableValues): Record<string, unknown> | undefined;
|
|
244
|
+
declare function getVariableValues(variableValues: VersionedVariableValues): VariableValues<Record<string, unknown>>;
|
|
245
|
+
|
|
246
|
+
declare function getGraphQLResolveInfo(info: GraphQLResolveInfo | undefined): GraphQLResolveInfo$1 | undefined;
|
|
247
|
+
|
|
235
248
|
declare const prototypePollutingKeys: readonly ["__proto__", "constructor", "prototype"];
|
|
236
249
|
type PrototypePollutingKey = (typeof prototypePollutingKeys)[number];
|
|
237
250
|
declare function isPrototypePollutingKey(key: string): key is PrototypePollutingKey;
|
|
238
251
|
|
|
239
|
-
declare const handleOverrideByDelegation: (info: GraphQLResolveInfo
|
|
252
|
+
declare const handleOverrideByDelegation: (info: GraphQLResolveInfo, context: any, overrideHandler: OverrideHandler) => boolean;
|
|
240
253
|
|
|
241
|
-
export { type BatchingOptions, type CreateProxyingResolverFn, type Deferred, type DelegationContext, type DelegationPlanBuilder, type DelegationPlanLeftOver, EMPTY_OBJECT, type ExternalObject, FIELD_SUBSCHEMA_MAP_SYMBOL, type ICreateProxyingResolverOptions, type ICreateRequest, type IDelegateRequestOptions, type IDelegateToSchemaOptions, type MergedFieldConfig, type MergedTypeConfig, type MergedTypeEntryPoint, type MergedTypeInfo, type MergedTypeResolver, type MergedTypeResolverOptions, OBJECT_SUBSCHEMA_SYMBOL, type OverrideHandler, PLAN_LEFT_OVER, type RequestTransform, type ResultTransform, type SchemaTransform, type StitchingInfo, Subschema, type SubschemaConfig, type Transform, Transformer, UNPATHED_ERRORS_SYMBOL, annotateExternalObject, applySchemaTransforms, cloneSubschemaConfig, createRequest, defaultMergedResolver, delegateRequest, delegateToSchema, extractUnavailableFields, extractUnavailableFieldsFromSelectionSet, getActualFieldNodes, getDelegatingOperation, getPlanLeftOverFromParent, getSubschema, getTypeInfo, getTypeInfoWithType, getUnpathedErrors, handleOverrideByDelegation, handleResolverResult, isExternalObject, isPrototypePollutingKey, isSubschema, isSubschemaConfig, leftOverByDelegationPlan, mergeFields, resolveExternalValue, subtractSelectionSets };
|
|
254
|
+
export { type BatchingOptions, type CreateProxyingResolverFn, type Deferred, type DelegationContext, type DelegationPlanBuilder, type DelegationPlanLeftOver, EMPTY_OBJECT, type ExternalObject, FIELD_SUBSCHEMA_MAP_SYMBOL, type ICreateProxyingResolverOptions, type ICreateRequest, type IDelegateRequestOptions, type IDelegateToSchemaOptions, type MergedFieldConfig, type MergedTypeConfig, type MergedTypeEntryPoint, type MergedTypeInfo, type MergedTypeResolver, type MergedTypeResolverOptions, OBJECT_SUBSCHEMA_SYMBOL, type OverrideHandler, PLAN_LEFT_OVER, type RequestTransform, type ResultTransform, type SchemaTransform, type StitchingInfo, Subschema, type SubschemaConfig, type Transform, Transformer, UNPATHED_ERRORS_SYMBOL, annotateExternalObject, applySchemaTransforms, cloneSubschemaConfig, createRequest, defaultMergedResolver, delegateRequest, delegateToSchema, extractUnavailableFields, extractUnavailableFieldsFromSelectionSet, getActualFieldNodes, getCoercedVariableValues, getDelegatingOperation, getGraphQLResolveInfo, getPlanLeftOverFromParent, getSubschema, getTypeInfo, getTypeInfoWithType, getUnpathedErrors, getVariableValues, handleOverrideByDelegation, handleResolverResult, isExternalObject, isPrototypePollutingKey, isSubschema, isSubschemaConfig, leftOverByDelegationPlan, mergeFields, resolveExternalValue, subtractSelectionSets };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { memoize2, memoize1, collectFields, relocatedError, mergeDeep, promiseReduce, pathToArray,
|
|
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
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, isSchema, OperationTypeNode, validate } from 'graphql';
|
|
4
4
|
import { handleMaybePromise, isPromise, createDeferredPromise, mapAsyncIterator } from '@whatwg-node/promise-helpers';
|
|
@@ -66,6 +66,15 @@ function getCoercedVariableValues(variableValues) {
|
|
|
66
66
|
}
|
|
67
67
|
return variableValues;
|
|
68
68
|
}
|
|
69
|
+
function getVariableValues(variableValues) {
|
|
70
|
+
if (variableValues != null && Object.hasOwn(variableValues, "coerced") && Object.hasOwn(variableValues, "sources")) {
|
|
71
|
+
return variableValues;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
coerced: variableValues ?? {},
|
|
75
|
+
sources: {}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
69
78
|
|
|
70
79
|
const prototypePollutingKeys = [
|
|
71
80
|
"__proto__",
|
|
@@ -147,7 +156,7 @@ function handleResolverResult(resolverResult, subschema, selectionSet, object, c
|
|
|
147
156
|
const { fields } = collectFields(
|
|
148
157
|
schema,
|
|
149
158
|
info.fragments,
|
|
150
|
-
|
|
159
|
+
getVariableValues(info.variableValues),
|
|
151
160
|
type,
|
|
152
161
|
selectionSet
|
|
153
162
|
);
|
|
@@ -558,7 +567,7 @@ function getResponseKey(info) {
|
|
|
558
567
|
`Data cannot be extracted from result without an explicit key or source schema.`
|
|
559
568
|
);
|
|
560
569
|
}
|
|
561
|
-
return
|
|
570
|
+
return info.fieldNodes[0].alias?.value ?? info.fieldName;
|
|
562
571
|
}
|
|
563
572
|
function getReturnType(info) {
|
|
564
573
|
if (info == null) {
|
|
@@ -2307,6 +2316,20 @@ function removeOverlappingAliases(result) {
|
|
|
2307
2316
|
return result;
|
|
2308
2317
|
}
|
|
2309
2318
|
|
|
2319
|
+
const asyncHelpers = {
|
|
2320
|
+
promiseAll: Promise.all.bind(Promise),
|
|
2321
|
+
track: () => void 0
|
|
2322
|
+
};
|
|
2323
|
+
function getGraphQLResolveInfo(info) {
|
|
2324
|
+
if (info == null || "getAbortSignal" in info && "getAsyncHelpers" in info) {
|
|
2325
|
+
return info;
|
|
2326
|
+
}
|
|
2327
|
+
return Object.assign(info, {
|
|
2328
|
+
getAbortSignal: () => void 0,
|
|
2329
|
+
getAsyncHelpers: () => asyncHelpers
|
|
2330
|
+
});
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2310
2333
|
function getDelegatingOperation(parentType, schema) {
|
|
2311
2334
|
if (parentType === schema.getMutationType()) {
|
|
2312
2335
|
return "mutation";
|
|
@@ -2510,7 +2533,7 @@ function createRequest({
|
|
|
2510
2533
|
rootValue,
|
|
2511
2534
|
operationName: targetOperationName,
|
|
2512
2535
|
context,
|
|
2513
|
-
info,
|
|
2536
|
+
info: getGraphQLResolveInfo(info),
|
|
2514
2537
|
operationType: targetOperation
|
|
2515
2538
|
};
|
|
2516
2539
|
}
|
|
@@ -2556,7 +2579,7 @@ function defaultMergedResolver(parent, args, context, info) {
|
|
|
2556
2579
|
if (!parent) {
|
|
2557
2580
|
return null;
|
|
2558
2581
|
}
|
|
2559
|
-
const responseKey =
|
|
2582
|
+
const responseKey = info.fieldNodes[0].alias?.value ?? info.fieldName;
|
|
2560
2583
|
if (!isExternalObject(parent)) {
|
|
2561
2584
|
return defaultFieldResolver(parent, args, context, info);
|
|
2562
2585
|
}
|
|
@@ -3525,4 +3548,4 @@ function subtractSelectionSets(selectionSetA, selectionSetB, fragments = {}) {
|
|
|
3525
3548
|
};
|
|
3526
3549
|
}
|
|
3527
3550
|
|
|
3528
|
-
export { EMPTY_OBJECT, FIELD_SUBSCHEMA_MAP_SYMBOL, OBJECT_SUBSCHEMA_SYMBOL, PLAN_LEFT_OVER, Subschema, Transformer, UNPATHED_ERRORS_SYMBOL, annotateExternalObject, applySchemaTransforms, cloneSubschemaConfig, createRequest, defaultMergedResolver, delegateRequest, delegateToSchema, extractUnavailableFields, extractUnavailableFieldsFromSelectionSet, getActualFieldNodes, getDelegatingOperation, getPlanLeftOverFromParent, getSubschema, getTypeInfo, getTypeInfoWithType, getUnpathedErrors, handleOverrideByDelegation, handleResolverResult, isExternalObject, isPrototypePollutingKey, isSubschema, isSubschemaConfig, leftOverByDelegationPlan, mergeFields, resolveExternalValue, subtractSelectionSets };
|
|
3551
|
+
export { EMPTY_OBJECT, FIELD_SUBSCHEMA_MAP_SYMBOL, OBJECT_SUBSCHEMA_SYMBOL, PLAN_LEFT_OVER, Subschema, Transformer, UNPATHED_ERRORS_SYMBOL, annotateExternalObject, applySchemaTransforms, cloneSubschemaConfig, createRequest, defaultMergedResolver, delegateRequest, delegateToSchema, extractUnavailableFields, extractUnavailableFieldsFromSelectionSet, getActualFieldNodes, getCoercedVariableValues, getDelegatingOperation, getGraphQLResolveInfo, getPlanLeftOverFromParent, getSubschema, getTypeInfo, getTypeInfoWithType, getUnpathedErrors, getVariableValues, handleOverrideByDelegation, handleResolverResult, isExternalObject, isPrototypePollutingKey, isSubschema, isSubschemaConfig, leftOverByDelegationPlan, mergeFields, resolveExternalValue, subtractSelectionSets };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depup/graphql-tools__delegate",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.2.0-depup.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A set of utils for faster development of GraphQL tools (with updated dependencies)",
|
|
6
6
|
"repository": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@graphql-tools/batch-execute": "^10.0
|
|
43
|
-
"@graphql-tools/executor": "^2.0.
|
|
44
|
-
"@graphql-tools/schema": "^10.1.
|
|
45
|
-
"@graphql-tools/utils": "^12.0.
|
|
42
|
+
"@graphql-tools/batch-execute": "^10.2.0",
|
|
43
|
+
"@graphql-tools/executor": "^2.0.1",
|
|
44
|
+
"@graphql-tools/schema": "^10.1.1",
|
|
45
|
+
"@graphql-tools/utils": "^12.0.1",
|
|
46
46
|
"@repeaterjs/repeater": "^3.1.0",
|
|
47
47
|
"@whatwg-node/promise-helpers": "^1.3.2",
|
|
48
48
|
"dataloader": "^2.2.3",
|
|
@@ -64,27 +64,15 @@
|
|
|
64
64
|
],
|
|
65
65
|
"depup": {
|
|
66
66
|
"changes": {
|
|
67
|
-
"@graphql-tools/executor": {
|
|
68
|
-
"from": "^1.4.13",
|
|
69
|
-
"to": "^2.0.0"
|
|
70
|
-
},
|
|
71
|
-
"@graphql-tools/schema": {
|
|
72
|
-
"from": "^10.0.29",
|
|
73
|
-
"to": "^10.1.0"
|
|
74
|
-
},
|
|
75
|
-
"@graphql-tools/utils": {
|
|
76
|
-
"from": "^11.0.0",
|
|
77
|
-
"to": "^12.0.0"
|
|
78
|
-
},
|
|
79
67
|
"@repeaterjs/repeater": {
|
|
80
68
|
"from": "^3.0.6",
|
|
81
69
|
"to": "^3.1.0"
|
|
82
70
|
}
|
|
83
71
|
},
|
|
84
|
-
"depsUpdated":
|
|
72
|
+
"depsUpdated": 1,
|
|
85
73
|
"originalPackage": "@graphql-tools/delegate",
|
|
86
|
-
"originalVersion": "12.
|
|
87
|
-
"processedAt": "2026-09-
|
|
74
|
+
"originalVersion": "12.2.0",
|
|
75
|
+
"processedAt": "2026-09-09T00:32:48.470Z",
|
|
88
76
|
"smokeTest": "passed"
|
|
89
77
|
}
|
|
90
78
|
}
|