@graphql-tools/delegate 8.7.3 → 8.7.4
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/Transformer.d.ts +1 -1
- package/checkResultAndHandleErrors.d.ts +1 -1
- package/delegateToSchema.d.ts +2 -2
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +4 -4
- package/resolveExternalValue.d.ts +1 -1
package/Transformer.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExecutionRequest, ExecutionResult } from '@graphql-tools/utils';
|
|
2
2
|
import { DelegationContext } from './types';
|
|
3
|
-
export declare class Transformer<TContext = Record<string, any>> {
|
|
3
|
+
export declare class Transformer<TContext extends Record<string, any> = Record<string, any>> {
|
|
4
4
|
private transformations;
|
|
5
5
|
private delegationContext;
|
|
6
6
|
constructor(context: DelegationContext<TContext>);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GraphQLError } from 'graphql';
|
|
2
2
|
import { ExecutionResult } from '@graphql-tools/utils';
|
|
3
3
|
import { DelegationContext } from './types';
|
|
4
|
-
export declare function checkResultAndHandleErrors<TContext
|
|
4
|
+
export declare function checkResultAndHandleErrors<TContext extends Record<string, any>>(result: ExecutionResult, delegationContext: DelegationContext<TContext>): any;
|
|
5
5
|
export declare function mergeDataAndErrors(data: any, errors: ReadonlyArray<GraphQLError>, path: Array<string | number> | undefined, onLocatedError?: (originalError: GraphQLError) => GraphQLError, index?: number): {
|
|
6
6
|
data: any;
|
|
7
7
|
unpathedErrors: Array<GraphQLError>;
|
package/delegateToSchema.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GraphQLSchema } from 'graphql';
|
|
2
2
|
import { Executor } from '@graphql-tools/utils';
|
|
3
3
|
import { IDelegateToSchemaOptions, IDelegateRequestOptions } from './types';
|
|
4
|
-
export declare function delegateToSchema<TContext = Record<string, any>, TArgs = any>(options: IDelegateToSchemaOptions<TContext, TArgs>): any;
|
|
5
|
-
export declare function delegateRequest<TContext = Record<string, any>, TArgs = any>(options: IDelegateRequestOptions<TContext, TArgs>): any;
|
|
4
|
+
export declare function delegateToSchema<TContext extends Record<string, any> = Record<string, any>, TArgs extends Record<string, any> = any>(options: IDelegateToSchemaOptions<TContext, TArgs>): any;
|
|
5
|
+
export declare function delegateRequest<TContext extends Record<string, any> = Record<string, any>, TArgs extends Record<string, any> = any>(options: IDelegateRequestOptions<TContext, TArgs>): any;
|
|
6
6
|
export declare const createDefaultExecutor: (schema: GraphQLSchema) => Executor;
|
package/index.js
CHANGED
|
@@ -948,7 +948,7 @@ class Transformer {
|
|
|
948
948
|
}
|
|
949
949
|
transformResult(originalResult) {
|
|
950
950
|
let result = originalResult;
|
|
951
|
-
// from
|
|
951
|
+
// from right to left
|
|
952
952
|
for (let i = this.transformations.length - 1; i >= 0; i--) {
|
|
953
953
|
const transformation = this.transformations[i];
|
|
954
954
|
if (transformation.transform.transformResult) {
|
package/index.mjs
CHANGED
|
@@ -944,7 +944,7 @@ class Transformer {
|
|
|
944
944
|
}
|
|
945
945
|
transformResult(originalResult) {
|
|
946
946
|
let result = originalResult;
|
|
947
|
-
// from
|
|
947
|
+
// from right to left
|
|
948
948
|
for (let i = this.transformations.length - 1; i >= 0; i--) {
|
|
949
949
|
const transformation = this.transformations[i];
|
|
950
950
|
if (transformation.transform.transformResult) {
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-tools/delegate",
|
|
3
|
-
"version": "8.7.
|
|
3
|
+
"version": "8.7.4",
|
|
4
4
|
"description": "A set of utils for faster development of GraphQL tools",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
7
7
|
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@graphql-tools/batch-execute": "8.4.
|
|
11
|
-
"@graphql-tools/schema": "8.3.
|
|
12
|
-
"@graphql-tools/utils": "8.6.
|
|
10
|
+
"@graphql-tools/batch-execute": "8.4.4",
|
|
11
|
+
"@graphql-tools/schema": "8.3.8",
|
|
12
|
+
"@graphql-tools/utils": "8.6.7",
|
|
13
13
|
"dataloader": "2.1.0",
|
|
14
14
|
"graphql-executor": "0.0.23",
|
|
15
15
|
"tslib": "~2.3.0",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { GraphQLResolveInfo, GraphQLError, GraphQLSchema, GraphQLOutputType } from 'graphql';
|
|
2
2
|
import { SubschemaConfig } from './types';
|
|
3
|
-
export declare function resolveExternalValue<TContext
|
|
3
|
+
export declare function resolveExternalValue<TContext extends Record<string, any>>(result: any, unpathedErrors: Array<GraphQLError>, subschema: GraphQLSchema | SubschemaConfig<any, any, any, TContext>, context?: Record<string, any>, info?: GraphQLResolveInfo, returnType?: GraphQLOutputType, skipTypeMerging?: boolean): any;
|