@graphql-tools/delegate 9.0.0-alpha-e2ab84c8.0 → 9.0.0-alpha-25204a2f.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 +0 -2
- package/cjs/Subschema.js +22 -0
- package/cjs/Transformer.js +45 -0
- package/cjs/applySchemaTransforms.js +11 -0
- package/cjs/checkResultAndHandleErrors.js +77 -0
- package/cjs/createRequest.js +125 -0
- package/cjs/defaultMergedResolver.js +29 -0
- package/cjs/delegateToSchema.js +148 -0
- package/cjs/finalizeGatewayRequest.js +317 -0
- package/cjs/getDocumentMetadata.js +25 -0
- package/cjs/index.js +13 -0
- package/cjs/mergeFields.js +87 -0
- package/cjs/package.json +1 -0
- package/cjs/prepareGatewayDocument.js +311 -0
- package/cjs/resolveExternalValue.js +103 -0
- package/cjs/subschemaConfig.js +31 -0
- package/cjs/symbols.js +6 -0
- package/cjs/types.js +3 -0
- package/esm/Subschema.js +17 -0
- package/esm/Transformer.js +41 -0
- package/esm/applySchemaTransforms.js +7 -0
- package/esm/checkResultAndHandleErrors.js +72 -0
- package/esm/createRequest.js +120 -0
- package/esm/defaultMergedResolver.js +25 -0
- package/esm/delegateToSchema.js +143 -0
- package/esm/finalizeGatewayRequest.js +313 -0
- package/esm/getDocumentMetadata.js +21 -0
- package/esm/index.js +10 -0
- package/esm/mergeFields.js +79 -0
- package/esm/prepareGatewayDocument.js +307 -0
- package/esm/resolveExternalValue.js +99 -0
- package/esm/subschemaConfig.js +26 -0
- package/esm/symbols.js +3 -0
- package/esm/types.js +1 -0
- package/package.json +40 -18
- package/{Subschema.d.ts → typings/Subschema.d.ts} +7 -3
- package/{Transformer.d.ts → typings/Transformer.d.ts} +3 -3
- package/{applySchemaTransforms.d.ts → typings/applySchemaTransforms.d.ts} +2 -2
- package/typings/checkResultAndHandleErrors.d.ts +8 -0
- package/{createRequest.d.ts → typings/createRequest.d.ts} +1 -2
- package/{defaultMergedResolver.d.ts → typings/defaultMergedResolver.d.ts} +2 -4
- package/typings/delegateToSchema.d.ts +6 -0
- package/typings/finalizeGatewayRequest.d.ts +3 -0
- package/{getDocumentMetadata.d.ts → typings/getDocumentMetadata.d.ts} +0 -0
- package/typings/index.d.ts +10 -0
- package/typings/mergeFields.d.ts +8 -0
- package/{prepareGatewayDocument.d.ts → typings/prepareGatewayDocument.d.ts} +0 -0
- package/typings/resolveExternalValue.d.ts +3 -0
- package/{subschemaConfig.d.ts → typings/subschemaConfig.d.ts} +1 -1
- package/typings/symbols.d.ts +3 -0
- package/{types.d.ts → typings/types.d.ts} +21 -40
- package/delegateToSchema.d.ts +0 -9
- package/externalObjects.d.ts +0 -11
- package/externalValues.d.ts +0 -4
- package/finalizeGatewayRequest.d.ts +0 -3
- package/getMergedParent.d.ts +0 -9
- package/index.d.ts +0 -11
- package/index.js +0 -1624
- package/index.mjs +0 -1590
- package/mergeDataAndErrors.d.ts +0 -5
- package/symbols.d.ts +0 -7
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { GraphQLResolveInfo } from 'graphql';
|
|
2
|
-
import { ExternalObject } from './types';
|
|
2
|
+
import { ExternalObject } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Resolver that knows how to:
|
|
5
5
|
* a) handle aliases for proxied schemas
|
|
6
6
|
* b) handle errors from proxied schemas
|
|
7
|
-
* c) handle external to internal enum
|
|
8
|
-
* d) handle type merging
|
|
9
|
-
* e) handle deferred values
|
|
7
|
+
* c) handle external to internal enum conversion
|
|
10
8
|
*/
|
|
11
9
|
export declare function defaultMergedResolver(parent: ExternalObject, args: Record<string, any>, context: Record<string, any>, info: GraphQLResolveInfo): any;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GraphQLSchema } from 'graphql';
|
|
2
|
+
import { Executor } from '@graphql-tools/utils';
|
|
3
|
+
import { IDelegateToSchemaOptions, IDelegateRequestOptions } from './types.js';
|
|
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
|
+
export declare const createDefaultExecutor: (schema: GraphQLSchema) => Executor;
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './Subschema.js';
|
|
2
|
+
export * from './Transformer.js';
|
|
3
|
+
export * from './applySchemaTransforms.js';
|
|
4
|
+
export * from './createRequest.js';
|
|
5
|
+
export * from './defaultMergedResolver.js';
|
|
6
|
+
export * from './delegateToSchema.js';
|
|
7
|
+
export * from './mergeFields.js';
|
|
8
|
+
export * from './resolveExternalValue.js';
|
|
9
|
+
export * from './subschemaConfig.js';
|
|
10
|
+
export * from './types.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GraphQLResolveInfo, GraphQLError, GraphQLSchema } from 'graphql';
|
|
2
|
+
import { ExternalObject, MergedTypeInfo, SubschemaConfig } from './types.js';
|
|
3
|
+
import { Subschema } from './Subschema.js';
|
|
4
|
+
export declare function isExternalObject(data: any): data is ExternalObject;
|
|
5
|
+
export declare function annotateExternalObject<TContext>(object: any, errors: Array<GraphQLError>, subschema: GraphQLSchema | SubschemaConfig<any, any, any, TContext> | undefined, subschemaMap: Record<string, GraphQLSchema | SubschemaConfig<any, any, any, Record<string, any>>>): ExternalObject;
|
|
6
|
+
export declare function getSubschema(object: ExternalObject, responseKey: string): GraphQLSchema | SubschemaConfig;
|
|
7
|
+
export declare function getUnpathedErrors(object: ExternalObject): Array<GraphQLError>;
|
|
8
|
+
export declare function mergeFields<TContext>(mergedTypeInfo: MergedTypeInfo, object: any, sourceSubschema: Subschema<any, any, any, TContext>, context: any, info: GraphQLResolveInfo): Promise<any>;
|
|
File without changes
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { GraphQLResolveInfo, GraphQLError, GraphQLSchema, GraphQLOutputType } from 'graphql';
|
|
2
|
+
import { SubschemaConfig } from './types.js';
|
|
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;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { SubschemaConfig } from './types';
|
|
1
|
+
import { SubschemaConfig } from './types.js';
|
|
2
2
|
export declare function isSubschemaConfig(value: any): value is SubschemaConfig<any, any, any, any>;
|
|
3
3
|
export declare function cloneSubschemaConfig(subschemaConfig: SubschemaConfig): SubschemaConfig;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { GraphQLSchema, GraphQLOutputType, SelectionSetNode, FieldNode, GraphQLResolveInfo, GraphQLFieldResolver, FragmentDefinitionNode, GraphQLObjectType, VariableDefinitionNode, OperationTypeNode, GraphQLError, GraphQLNamedType
|
|
1
|
+
import { GraphQLSchema, GraphQLOutputType, SelectionSetNode, FieldNode, GraphQLResolveInfo, GraphQLFieldResolver, FragmentDefinitionNode, GraphQLObjectType, VariableDefinitionNode, OperationTypeNode, GraphQLError, GraphQLNamedType } from 'graphql';
|
|
2
2
|
import DataLoader from 'dataloader';
|
|
3
3
|
import { ExecutionRequest, ExecutionResult, Executor } from '@graphql-tools/utils';
|
|
4
|
-
import { Subschema } from './Subschema';
|
|
5
|
-
import {
|
|
6
|
-
export declare type SchemaTransform<TContext = Record<any, string>> = (originalWrappingSchema: GraphQLSchema, subschemaConfig: SubschemaConfig<any, any, any, TContext
|
|
7
|
-
export declare type RequestTransform<T = Record<string, any>> = (originalRequest: ExecutionRequest, delegationContext: DelegationContext
|
|
8
|
-
export declare type ResultTransform<T = Record<string, any>> = (originalResult: ExecutionResult, delegationContext: DelegationContext
|
|
4
|
+
import { Subschema } from './Subschema.js';
|
|
5
|
+
import { OBJECT_SUBSCHEMA_SYMBOL, FIELD_SUBSCHEMA_MAP_SYMBOL, UNPATHED_ERRORS_SYMBOL } from './symbols.js';
|
|
6
|
+
export declare type SchemaTransform<TContext = Record<any, string>> = (originalWrappingSchema: GraphQLSchema, subschemaConfig: SubschemaConfig<any, any, any, TContext>) => GraphQLSchema;
|
|
7
|
+
export declare type RequestTransform<T = Record<string, any>, TContext = Record<any, string>> = (originalRequest: ExecutionRequest, delegationContext: DelegationContext<TContext>, transformationContext: T) => ExecutionRequest;
|
|
8
|
+
export declare type ResultTransform<T = Record<string, any>, TContext = Record<any, string>> = (originalResult: ExecutionResult, delegationContext: DelegationContext<TContext>, transformationContext: T) => ExecutionResult;
|
|
9
9
|
export interface Transform<T = any, TContext = Record<string, any>> {
|
|
10
10
|
transformSchema?: SchemaTransform<TContext>;
|
|
11
|
-
transformRequest?: RequestTransform<T>;
|
|
12
|
-
transformResult?: ResultTransform<T>;
|
|
11
|
+
transformRequest?: RequestTransform<T, TContext>;
|
|
12
|
+
transformResult?: ResultTransform<T, TContext>;
|
|
13
13
|
}
|
|
14
14
|
export interface DelegationContext<TContext = Record<string, any>> {
|
|
15
15
|
subschema: GraphQLSchema | SubschemaConfig<any, any, any, TContext>;
|
|
@@ -21,9 +21,11 @@ export interface DelegationContext<TContext = Record<string, any>> {
|
|
|
21
21
|
context?: TContext;
|
|
22
22
|
info?: GraphQLResolveInfo;
|
|
23
23
|
returnType: GraphQLOutputType;
|
|
24
|
+
onLocatedError?: (originalError: GraphQLError) => GraphQLError;
|
|
24
25
|
rootValue?: any;
|
|
25
26
|
transforms: Array<Transform<any, TContext>>;
|
|
26
27
|
transformedSchema: GraphQLSchema;
|
|
28
|
+
skipTypeMerging: boolean;
|
|
27
29
|
}
|
|
28
30
|
export interface IDelegateToSchemaOptions<TContext = Record<string, any>, TArgs = Record<string, any>> {
|
|
29
31
|
schema: GraphQLSchema | SubschemaConfig<any, any, any, TContext>;
|
|
@@ -41,20 +43,11 @@ export interface IDelegateToSchemaOptions<TContext = Record<string, any>, TArgs
|
|
|
41
43
|
transforms?: Array<Transform<any, TContext>>;
|
|
42
44
|
transformedSchema?: GraphQLSchema;
|
|
43
45
|
validateRequest?: boolean;
|
|
46
|
+
skipTypeMerging?: boolean;
|
|
44
47
|
}
|
|
45
48
|
export interface IDelegateRequestOptions<TContext = Record<string, any>, TArgs = Record<string, any>> extends IDelegateToSchemaOptions<TContext, TArgs> {
|
|
46
49
|
request: ExecutionRequest;
|
|
47
50
|
}
|
|
48
|
-
export interface ICreateRequestFromInfo {
|
|
49
|
-
info: GraphQLResolveInfo;
|
|
50
|
-
rootValue?: any;
|
|
51
|
-
operationName?: string;
|
|
52
|
-
operation?: OperationTypeNode;
|
|
53
|
-
fieldName?: string;
|
|
54
|
-
selectionSet?: SelectionSetNode;
|
|
55
|
-
fieldNodes?: ReadonlyArray<FieldNode>;
|
|
56
|
-
context?: any;
|
|
57
|
-
}
|
|
58
51
|
export interface ICreateRequest {
|
|
59
52
|
sourceSchema?: GraphQLSchema;
|
|
60
53
|
sourceParentType?: GraphQLObjectType;
|
|
@@ -71,15 +64,7 @@ export interface ICreateRequest {
|
|
|
71
64
|
context?: any;
|
|
72
65
|
info?: GraphQLResolveInfo;
|
|
73
66
|
}
|
|
74
|
-
export
|
|
75
|
-
result: ExecutionResult;
|
|
76
|
-
schema: GraphQLSchema | SubschemaConfig<any, any, any, TContext>;
|
|
77
|
-
fieldName?: string;
|
|
78
|
-
context?: TContext;
|
|
79
|
-
info?: GraphQLResolveInfo;
|
|
80
|
-
returnType?: GraphQLOutputType;
|
|
81
|
-
onLocatedError?: (error: GraphQLError) => GraphQLError;
|
|
82
|
-
}
|
|
67
|
+
export declare type DelegationPlanBuilder = (schema: GraphQLSchema, sourceSubschema: Subschema<any, any, any, any>, variableValues: Record<string, any>, fragments: Record<string, FragmentDefinitionNode>, fieldNodes: FieldNode[]) => Array<Map<Subschema, SelectionSetNode>>;
|
|
83
68
|
export interface MergedTypeInfo<TContext = Record<string, any>> {
|
|
84
69
|
typeName: string;
|
|
85
70
|
selectionSet?: SelectionSetNode;
|
|
@@ -87,14 +72,13 @@ export interface MergedTypeInfo<TContext = Record<string, any>> {
|
|
|
87
72
|
uniqueFields: Record<string, Subschema<any, any, any, TContext>>;
|
|
88
73
|
nonUniqueFields: Record<string, Array<Subschema<any, any, any, TContext>>>;
|
|
89
74
|
typeMaps: Map<GraphQLSchema | SubschemaConfig<any, any, any, TContext>, Record<string, GraphQLNamedType>>;
|
|
90
|
-
subschemaFields: Record<string, boolean>;
|
|
91
75
|
selectionSets: Map<Subschema<any, any, any, TContext>, SelectionSetNode>;
|
|
92
76
|
fieldSelectionSets: Map<Subschema<any, any, any, TContext>, Record<string, SelectionSetNode>>;
|
|
93
77
|
resolvers: Map<Subschema<any, any, any, TContext>, MergedTypeResolver<TContext>>;
|
|
78
|
+
delegationPlanBuilder: DelegationPlanBuilder;
|
|
94
79
|
}
|
|
95
80
|
export interface ICreateProxyingResolverOptions<TContext = Record<string, any>> {
|
|
96
81
|
subschemaConfig: SubschemaConfig<any, any, any, TContext>;
|
|
97
|
-
transformedSchema?: GraphQLSchema;
|
|
98
82
|
operation?: OperationTypeNode;
|
|
99
83
|
fieldName?: string;
|
|
100
84
|
}
|
|
@@ -108,12 +92,12 @@ export interface SubschemaConfig<K = any, V = any, C = K, TContext = Record<stri
|
|
|
108
92
|
createProxyingResolver?: CreateProxyingResolverFn<TContext>;
|
|
109
93
|
rootValue?: any;
|
|
110
94
|
transforms?: Array<Transform<any, TContext>>;
|
|
111
|
-
merge?: Record<string, MergedTypeConfig<any, TContext>>;
|
|
95
|
+
merge?: Record<string, MergedTypeConfig<any, any, TContext>>;
|
|
112
96
|
executor?: Executor<TContext>;
|
|
113
97
|
batch?: boolean;
|
|
114
98
|
batchingOptions?: BatchingOptions<K, V, C>;
|
|
115
99
|
}
|
|
116
|
-
export interface MergedTypeConfig<K = any, TContext = Record<string, any>> extends MergedTypeEntryPoint<K, TContext> {
|
|
100
|
+
export interface MergedTypeConfig<K = any, V = any, TContext = Record<string, any>> extends MergedTypeEntryPoint<K, V, TContext> {
|
|
117
101
|
entryPoints?: Array<MergedTypeEntryPoint>;
|
|
118
102
|
fields?: Record<string, MergedFieldConfig>;
|
|
119
103
|
computedFields?: Record<string, {
|
|
@@ -121,22 +105,23 @@ export interface MergedTypeConfig<K = any, TContext = Record<string, any>> exten
|
|
|
121
105
|
}>;
|
|
122
106
|
canonical?: boolean;
|
|
123
107
|
}
|
|
124
|
-
export interface MergedTypeEntryPoint<K = any, TContext = Record<string, any>> extends MergedTypeResolverOptions<K> {
|
|
108
|
+
export interface MergedTypeEntryPoint<K = any, V = any, TContext = Record<string, any>> extends MergedTypeResolverOptions<K, V> {
|
|
125
109
|
selectionSet?: string;
|
|
126
|
-
key?: (originalResult: any) => K
|
|
110
|
+
key?: (originalResult: any) => K | PromiseLike<K>;
|
|
127
111
|
resolve?: MergedTypeResolver<TContext>;
|
|
128
112
|
}
|
|
129
|
-
export interface MergedTypeResolverOptions<K = any> {
|
|
113
|
+
export interface MergedTypeResolverOptions<K = any, V = any> {
|
|
130
114
|
fieldName?: string;
|
|
131
115
|
args?: (originalResult: any) => Record<string, any>;
|
|
132
116
|
argsFromKeys?: (keys: ReadonlyArray<K>) => Record<string, any>;
|
|
117
|
+
valuesFromResults?: (results: any, keys: ReadonlyArray<K>) => Array<V>;
|
|
133
118
|
}
|
|
134
119
|
export interface MergedFieldConfig {
|
|
135
120
|
selectionSet?: string;
|
|
136
121
|
computed?: boolean;
|
|
137
122
|
canonical?: boolean;
|
|
138
123
|
}
|
|
139
|
-
export declare type MergedTypeResolver<TContext = Record<string, any>> = (originalResult: any, context: TContext, info: GraphQLResolveInfo, subschema:
|
|
124
|
+
export declare type MergedTypeResolver<TContext = Record<string, any>> = (originalResult: any, context: TContext, info: GraphQLResolveInfo, subschema: Subschema<any, any, any, TContext>, selectionSet: SelectionSetNode, key: any | undefined, type: GraphQLOutputType) => any;
|
|
140
125
|
export interface StitchingInfo<TContext = Record<string, any>> {
|
|
141
126
|
subschemaMap: Map<GraphQLSchema | SubschemaConfig<any, any, any, TContext>, Subschema<any, any, any, TContext>>;
|
|
142
127
|
fieldNodesByType: Record<string, Array<FieldNode>>;
|
|
@@ -147,11 +132,7 @@ export interface StitchingInfo<TContext = Record<string, any>> {
|
|
|
147
132
|
export interface ExternalObject<TContext = Record<string, any>> {
|
|
148
133
|
__typename: string;
|
|
149
134
|
key: any;
|
|
150
|
-
[UNPATHED_ERRORS_SYMBOL]: Array<GraphQLError>;
|
|
151
|
-
[INITIAL_PATH_SYMBOL]: Array<string | number>;
|
|
152
135
|
[OBJECT_SUBSCHEMA_SYMBOL]: GraphQLSchema | SubschemaConfig<any, any, any, TContext>;
|
|
153
|
-
[
|
|
154
|
-
[INFO_SYMBOL]: GraphQLResolveInfo;
|
|
155
|
-
[RESPONSE_KEY_SUBSCHEMA_MAP_SYMBOL]: Record<string, GraphQLSchema | SubschemaConfig<any, any, any, TContext>>;
|
|
136
|
+
[FIELD_SUBSCHEMA_MAP_SYMBOL]: Record<string, GraphQLSchema | SubschemaConfig<any, any, any, TContext>>;
|
|
156
137
|
[UNPATHED_ERRORS_SYMBOL]: Array<GraphQLError>;
|
|
157
138
|
}
|
package/delegateToSchema.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { GraphQLSchema, DocumentNode } from 'graphql';
|
|
2
|
-
import { Executor } from '@graphql-tools/utils';
|
|
3
|
-
import { IDelegateToSchemaOptions, IDelegateRequestOptions, DelegationContext } 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;
|
|
6
|
-
export declare function getDelegationContext<TContext>({ request, schema, fieldName, returnType, args, info, transforms, transformedSchema, }: IDelegateRequestOptions<TContext>): DelegationContext<TContext>;
|
|
7
|
-
export declare function validateRequest(delegationContext: DelegationContext<any>, document: DocumentNode): void;
|
|
8
|
-
export declare function getExecutor<TContext>(delegationContext: DelegationContext<TContext>): Executor<TContext>;
|
|
9
|
-
export declare const createDefaultExecutor: (schema: GraphQLSchema) => Executor;
|
package/externalObjects.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { GraphQLError, GraphQLFieldMap, GraphQLResolveInfo, GraphQLSchema } from 'graphql';
|
|
2
|
-
import { ExternalObject, SubschemaConfig } from './types';
|
|
3
|
-
export declare function isExternalObject(data: any): data is ExternalObject;
|
|
4
|
-
export declare function annotateExternalObject<TContext = Record<string, any>>(object: any, errors: Array<GraphQLError>, initialPath: Array<string | number>, subschema: GraphQLSchema | SubschemaConfig<any, any, any, TContext>, info?: GraphQLResolveInfo): ExternalObject;
|
|
5
|
-
export declare function getInitialPath(object: ExternalObject): Array<string | number>;
|
|
6
|
-
export declare function getInitialPossibleFields(object: ExternalObject): GraphQLFieldMap<any, any>;
|
|
7
|
-
export declare function getInfo(object: ExternalObject): GraphQLResolveInfo;
|
|
8
|
-
export declare function getUnpathedErrors(object: ExternalObject): Array<GraphQLError>;
|
|
9
|
-
export declare function getObjectSubchema(object: ExternalObject): GraphQLSchema | SubschemaConfig;
|
|
10
|
-
export declare function getSubschemaMap(object: ExternalObject): Record<string, GraphQLSchema | SubschemaConfig>;
|
|
11
|
-
export declare function getSubschema(object: ExternalObject, responseKey: string): GraphQLSchema | SubschemaConfig;
|
package/externalValues.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { GraphQLResolveInfo, GraphQLError, GraphQLSchema, GraphQLOutputType } from 'graphql';
|
|
2
|
-
import { ExternalValueFromResultOptions, SubschemaConfig } from './types';
|
|
3
|
-
export declare function externalValueFromResult<TContext = Record<string, any>>({ result, schema, info, context, fieldName, returnType, onLocatedError, }: ExternalValueFromResultOptions<TContext>): any;
|
|
4
|
-
export declare function createExternalValue<TContext = Record<string, any>>(data: any, unpathedErrors: Array<GraphQLError>, initialPath: Array<string | number>, subschema: GraphQLSchema | SubschemaConfig<any, any, any, TContext>, context?: TContext, info?: GraphQLResolveInfo, returnType?: GraphQLOutputType): any;
|
package/getMergedParent.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FieldNode, GraphQLResolveInfo, GraphQLSchema } from 'graphql';
|
|
2
|
-
import { ExternalObject, MergedTypeInfo } from './types';
|
|
3
|
-
import { Subschema } from './Subschema';
|
|
4
|
-
export declare function getMergedParent(parent: ExternalObject, context: Record<string, any>, info: GraphQLResolveInfo): Promise<ExternalObject>;
|
|
5
|
-
export declare const buildDelegationPlan: (mergedTypeInfo: MergedTypeInfo, gatewaySchema: GraphQLSchema, sourceSubschema: Subschema, ...fieldNodeArrays: Array<ReadonlyArray<FieldNode>>) => {
|
|
6
|
-
requiredKeys: Record<string, Set<string>>;
|
|
7
|
-
delegationMaps: Array<Map<Subschema, Array<FieldNode>>>;
|
|
8
|
-
stageMap: Record<string, number>;
|
|
9
|
-
};
|
package/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from './Subschema';
|
|
2
|
-
export * from './Transformer';
|
|
3
|
-
export * from './applySchemaTransforms';
|
|
4
|
-
export * from './createRequest';
|
|
5
|
-
export * from './defaultMergedResolver';
|
|
6
|
-
export * from './delegateToSchema';
|
|
7
|
-
export * from './getMergedParent';
|
|
8
|
-
export * from './externalObjects';
|
|
9
|
-
export * from './externalValues';
|
|
10
|
-
export * from './subschemaConfig';
|
|
11
|
-
export * from './types';
|