@graphql-mesh/hmac-upstream-signature 1.2.8-rc-3a94470d0fef9dc552c6923930dab707e92cbb42 → 1.2.8-rc-88d0f3811ad3f789d53b415d411064548cffff4f
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +9 -3
- package/dist/index.d.cts +140 -6
- package/dist/index.d.ts +140 -6
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
@@ -1,17 +1,23 @@
|
|
1
1
|
# @graphql-mesh/hmac-upstream-signature
|
2
2
|
|
3
|
-
## 1.2.8-rc-
|
3
|
+
## 1.2.8-rc-88d0f3811ad3f789d53b415d411064548cffff4f
|
4
4
|
|
5
5
|
### Patch Changes
|
6
6
|
|
7
|
+
- [#148](https://github.com/graphql-hive/gateway/pull/148) [`f32cb2a`](https://github.com/graphql-hive/gateway/commit/f32cb2a0289aa32e4811ced5dc1aac3efb0674f1) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
|
8
|
+
|
9
|
+
- Updated dependency [`@graphql-mesh/store@^0.103.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/store/v/0.103.0) (from `^0.102.12`, in `dependencies`)
|
10
|
+
- Updated dependency [`@graphql-mesh/types@^0.103.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/types/v/0.103.0) (from `^0.102.12`, in `dependencies`)
|
11
|
+
- Updated dependency [`@graphql-mesh/utils@^0.103.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/utils/v/0.103.0) (from `^0.102.12`, in `dependencies`)
|
12
|
+
|
7
13
|
- [#150](https://github.com/graphql-hive/gateway/pull/150) [`c0e189a`](https://github.com/graphql-hive/gateway/commit/c0e189ac83901da3a101f16f151e859ff7cca19f) Thanks [@enisdenjo](https://github.com/enisdenjo)! - dependencies updates:
|
8
14
|
|
9
15
|
- Updated dependency [`@graphql-mesh/store@^0.103.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/store/v/0.103.0) (from `^0.102.12`, in `dependencies`)
|
10
16
|
- Updated dependency [`@graphql-mesh/types@^0.103.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/types/v/0.103.0) (from `^0.102.12`, in `dependencies`)
|
11
17
|
- Updated dependency [`@graphql-mesh/utils@^0.103.0` ↗︎](https://www.npmjs.com/package/@graphql-mesh/utils/v/0.103.0) (from `^0.102.12`, in `dependencies`)
|
12
18
|
|
13
|
-
- Updated dependencies [[`c0e189a`](https://github.com/graphql-hive/gateway/commit/c0e189ac83901da3a101f16f151e859ff7cca19f)]:
|
14
|
-
- @graphql-mesh/transport-common@0.7.15-rc-
|
19
|
+
- Updated dependencies [[`f32cb2a`](https://github.com/graphql-hive/gateway/commit/f32cb2a0289aa32e4811ced5dc1aac3efb0674f1), [`c0e189a`](https://github.com/graphql-hive/gateway/commit/c0e189ac83901da3a101f16f151e859ff7cca19f)]:
|
20
|
+
- @graphql-mesh/transport-common@0.7.15-rc-88d0f3811ad3f789d53b415d411064548cffff4f
|
15
21
|
|
16
22
|
## 1.2.7
|
17
23
|
|
package/dist/index.d.cts
CHANGED
@@ -1,8 +1,98 @@
|
|
1
|
-
import { ExecutionRequest, Executor, MaybePromise, Maybe } from '@graphql-tools/utils';
|
1
|
+
import { ExecutionRequest, Executor, ExecutionResult, MaybePromise, Maybe } from '@graphql-tools/utils';
|
2
2
|
import { Plugin, YogaInitialContext, GraphQLParams } from 'graphql-yoga';
|
3
3
|
import { TransportEntry } from '@graphql-mesh/transport-common';
|
4
4
|
import { Logger, OnFetchHook, MeshFetch, MeshPubSub, KeyValueCache } from '@graphql-mesh/types';
|
5
|
-
import { GraphQLSchema, ExecutionResult } from 'graphql';
|
5
|
+
import { GraphQLSchema, FragmentDefinitionNode, FieldNode, GraphQLResolveInfo, SelectionSetNode, GraphQLOutputType, GraphQLFieldResolver, OperationTypeNode, GraphQLError, SelectionNode, ExecutionResult as ExecutionResult$1 } from 'graphql';
|
6
|
+
import DataLoader from 'dataloader';
|
7
|
+
import { GraphQLResolveInfo as GraphQLResolveInfo$1, GraphQLOutputType as GraphQLOutputType$1 } from 'graphql/type';
|
8
|
+
|
9
|
+
type SchemaTransform<TContext = Record<any, string>> = (originalWrappingSchema: GraphQLSchema, subschemaConfig: SubschemaConfig<any, any, any, TContext>) => GraphQLSchema;
|
10
|
+
type RequestTransform<T = Record<string, any>, TContext = Record<any, string>> = (originalRequest: ExecutionRequest, delegationContext: DelegationContext<TContext>, transformationContext: T) => ExecutionRequest;
|
11
|
+
type ResultTransform<T = Record<string, any>, TContext = Record<any, string>> = (originalResult: ExecutionResult, delegationContext: DelegationContext<TContext>, transformationContext: T) => ExecutionResult;
|
12
|
+
interface Transform<T = any, TContext = Record<string, any>> {
|
13
|
+
transformSchema?: SchemaTransform<TContext>;
|
14
|
+
transformRequest?: RequestTransform<T, TContext>;
|
15
|
+
transformResult?: ResultTransform<T, TContext>;
|
16
|
+
}
|
17
|
+
interface DelegationContext<TContext = Record<string, any>> {
|
18
|
+
subschema: GraphQLSchema | SubschemaConfig<any, any, any, TContext>;
|
19
|
+
subschemaConfig?: SubschemaConfig<any, any, any, TContext>;
|
20
|
+
targetSchema: GraphQLSchema;
|
21
|
+
operation: OperationTypeNode;
|
22
|
+
fieldName: string;
|
23
|
+
args?: Record<string, any>;
|
24
|
+
context?: TContext;
|
25
|
+
info?: GraphQLResolveInfo;
|
26
|
+
returnType: GraphQLOutputType;
|
27
|
+
onLocatedError?: (originalError: GraphQLError) => GraphQLError;
|
28
|
+
rootValue?: any;
|
29
|
+
transforms: Array<Transform<any, TContext>>;
|
30
|
+
transformedSchema: GraphQLSchema;
|
31
|
+
skipTypeMerging: boolean;
|
32
|
+
}
|
33
|
+
type DelegationPlanBuilder = (schema: GraphQLSchema, sourceSubschema: Subschema<any, any, any, any>, variableValues: Record<string, any>, fragments: Record<string, FragmentDefinitionNode>, fieldNodes: FieldNode[], context?: any, info?: GraphQLResolveInfo) => Array<Map<Subschema, SelectionSetNode>>;
|
34
|
+
interface ICreateProxyingResolverOptions<TContext = Record<string, any>> {
|
35
|
+
subschemaConfig: SubschemaConfig<any, any, any, TContext>;
|
36
|
+
operation?: OperationTypeNode;
|
37
|
+
fieldName?: string;
|
38
|
+
}
|
39
|
+
type CreateProxyingResolverFn<TContext = Record<string, any>> = (options: ICreateProxyingResolverOptions<TContext>) => GraphQLFieldResolver<any, TContext>;
|
40
|
+
interface BatchingOptions<K = any, V = any, C = K> {
|
41
|
+
extensionsReducer?: (mergedExtensions: Record<string, any>, request: ExecutionRequest) => Record<string, any>;
|
42
|
+
dataLoaderOptions?: DataLoader.Options<K, V, C>;
|
43
|
+
}
|
44
|
+
interface SubschemaConfig<K = any, V = any, C = K, TContext = Record<string, any>> {
|
45
|
+
name?: string;
|
46
|
+
schema: GraphQLSchema;
|
47
|
+
createProxyingResolver?: CreateProxyingResolverFn<TContext>;
|
48
|
+
rootValue?: any;
|
49
|
+
transforms?: Array<Transform<any, TContext>>;
|
50
|
+
merge?: Record<string, MergedTypeConfig<any, any, TContext>>;
|
51
|
+
executor?: Executor<TContext>;
|
52
|
+
batch?: boolean;
|
53
|
+
batchingOptions?: BatchingOptions<K, V, C>;
|
54
|
+
}
|
55
|
+
interface MergedTypeConfig<K = any, V = any, TContext = Record<string, any>> extends MergedTypeEntryPoint<K, V, TContext> {
|
56
|
+
entryPoints?: Array<MergedTypeEntryPoint>;
|
57
|
+
fields?: Record<string, MergedFieldConfig>;
|
58
|
+
canonical?: boolean;
|
59
|
+
}
|
60
|
+
interface MergedTypeEntryPoint<K = any, V = any, TContext = Record<string, any>> extends MergedTypeResolverOptions<K, V> {
|
61
|
+
selectionSet?: string;
|
62
|
+
key?: (originalResult: any) => K | PromiseLike<K>;
|
63
|
+
resolve?: MergedTypeResolver<TContext>;
|
64
|
+
}
|
65
|
+
interface MergedTypeResolverOptions<K = any, V = any> {
|
66
|
+
fieldName?: string;
|
67
|
+
args?: (originalResult: any) => Record<string, any>;
|
68
|
+
argsFromKeys?: (keys: ReadonlyArray<K>) => Record<string, any>;
|
69
|
+
valuesFromResults?: (results: any, keys: ReadonlyArray<K>) => Array<V>;
|
70
|
+
dataLoaderOptions?: DataLoader.Options<K, V>;
|
71
|
+
}
|
72
|
+
interface MergedFieldConfig {
|
73
|
+
selectionSet?: string;
|
74
|
+
computed?: boolean;
|
75
|
+
canonical?: boolean;
|
76
|
+
}
|
77
|
+
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;
|
78
|
+
|
79
|
+
interface ISubschema<K = any, V = any, C = K, TContext = Record<string, any>> extends SubschemaConfig<K, V, C, TContext> {
|
80
|
+
transformedSchema: GraphQLSchema;
|
81
|
+
}
|
82
|
+
declare class Subschema<K = any, V = any, C = K, TContext = Record<string, any>> implements ISubschema<K, V, C, TContext> {
|
83
|
+
name?: string;
|
84
|
+
schema: GraphQLSchema;
|
85
|
+
executor?: Executor<TContext>;
|
86
|
+
batch?: boolean;
|
87
|
+
batchingOptions?: BatchingOptions<K, V, C>;
|
88
|
+
createProxyingResolver?: CreateProxyingResolverFn<TContext>;
|
89
|
+
transforms: Array<Transform<any, TContext>>;
|
90
|
+
private _transformedSchema;
|
91
|
+
merge?: Record<string, MergedTypeConfig<any, any, TContext>>;
|
92
|
+
constructor(config: SubschemaConfig<K, V, C, TContext>);
|
93
|
+
get transformedSchema(): GraphQLSchema;
|
94
|
+
set transformedSchema(value: GraphQLSchema);
|
95
|
+
}
|
6
96
|
|
7
97
|
declare module 'graphql' {
|
8
98
|
interface GraphQLResolveInfo {
|
@@ -11,6 +101,8 @@ declare module 'graphql' {
|
|
11
101
|
}
|
12
102
|
interface UnifiedGraphPlugin<TContext> {
|
13
103
|
onSubgraphExecute?: OnSubgraphExecuteHook<TContext>;
|
104
|
+
onDelegationPlan?: OnDelegationPlanHook<TContext>;
|
105
|
+
onDelegationStageExecute?: OnDelegationStageExecuteHook<TContext>;
|
14
106
|
}
|
15
107
|
type OnSubgraphExecuteHook<TContext = any> = (payload: OnSubgraphExecutePayload<TContext>) => MaybePromise<Maybe<OnSubgraphExecuteDoneHook | void>>;
|
16
108
|
interface OnSubgraphExecutePayload<TContext> {
|
@@ -25,20 +117,62 @@ interface OnSubgraphExecutePayload<TContext> {
|
|
25
117
|
logger?: Logger;
|
26
118
|
}
|
27
119
|
interface OnSubgraphExecuteDonePayload {
|
28
|
-
result: AsyncIterable<ExecutionResult> | ExecutionResult;
|
29
|
-
setResult(result: AsyncIterable<ExecutionResult> | ExecutionResult): void;
|
120
|
+
result: AsyncIterable<ExecutionResult$1> | ExecutionResult$1;
|
121
|
+
setResult(result: AsyncIterable<ExecutionResult$1> | ExecutionResult$1): void;
|
30
122
|
}
|
31
123
|
type OnSubgraphExecuteDoneHook = (payload: OnSubgraphExecuteDonePayload) => MaybePromise<Maybe<OnSubgraphExecuteDoneResult | void>>;
|
32
124
|
type OnSubgraphExecuteDoneResultOnNext = (payload: OnSubgraphExecuteDoneOnNextPayload) => MaybePromise<void>;
|
33
125
|
interface OnSubgraphExecuteDoneOnNextPayload {
|
34
|
-
result: ExecutionResult;
|
35
|
-
setResult(result: ExecutionResult): void;
|
126
|
+
result: ExecutionResult$1;
|
127
|
+
setResult(result: ExecutionResult$1): void;
|
36
128
|
}
|
37
129
|
type OnSubgraphExecuteDoneResultOnEnd = () => MaybePromise<void>;
|
38
130
|
type OnSubgraphExecuteDoneResult = {
|
39
131
|
onNext?: OnSubgraphExecuteDoneResultOnNext;
|
40
132
|
onEnd?: OnSubgraphExecuteDoneResultOnEnd;
|
41
133
|
};
|
134
|
+
type OnDelegationPlanHook<TContext> = (payload: OnDelegationPlanHookPayload<TContext>) => Maybe<OnDelegationPlanDoneHook | void>;
|
135
|
+
interface OnDelegationPlanHookPayload<TContext> {
|
136
|
+
supergraph: GraphQLSchema;
|
137
|
+
subgraph: string;
|
138
|
+
sourceSubschema: Subschema<any, any, any, TContext>;
|
139
|
+
typeName: string;
|
140
|
+
variables: Record<string, any>;
|
141
|
+
fragments: Record<string, FragmentDefinitionNode>;
|
142
|
+
fieldNodes: SelectionNode[];
|
143
|
+
context: TContext;
|
144
|
+
requestId?: string;
|
145
|
+
logger?: Logger;
|
146
|
+
info?: GraphQLResolveInfo$1;
|
147
|
+
delegationPlanBuilder: DelegationPlanBuilder;
|
148
|
+
setDelegationPlanBuilder(delegationPlanBuilder: DelegationPlanBuilder): void;
|
149
|
+
}
|
150
|
+
type OnDelegationPlanDoneHook = (payload: OnDelegationPlanDonePayload) => Maybe<void>;
|
151
|
+
interface OnDelegationPlanDonePayload {
|
152
|
+
delegationPlan: ReturnType<DelegationPlanBuilder>;
|
153
|
+
setDelegationPlan: (delegationPlan: ReturnType<DelegationPlanBuilder>) => void;
|
154
|
+
}
|
155
|
+
type OnDelegationStageExecuteHook<TContext> = (payload: OnDelegationStageExecutePayload<TContext>) => Maybe<OnDelegationStageExecuteDoneHook>;
|
156
|
+
interface OnDelegationStageExecutePayload<TContext> {
|
157
|
+
object: any;
|
158
|
+
context: TContext;
|
159
|
+
info: GraphQLResolveInfo$1;
|
160
|
+
subgraph: string;
|
161
|
+
subschema: Subschema<any, any, any, TContext>;
|
162
|
+
selectionSet: SelectionSetNode;
|
163
|
+
key?: any;
|
164
|
+
type: GraphQLOutputType$1;
|
165
|
+
resolver: MergedTypeResolver<TContext>;
|
166
|
+
setResolver: (resolver: MergedTypeResolver<TContext>) => void;
|
167
|
+
typeName: string;
|
168
|
+
requestId?: string;
|
169
|
+
logger?: Logger;
|
170
|
+
}
|
171
|
+
type OnDelegationStageExecuteDoneHook = (payload: OnDelegationStageExecuteDonePayload) => void;
|
172
|
+
interface OnDelegationStageExecuteDonePayload {
|
173
|
+
result: any;
|
174
|
+
setResult: (result: any) => void;
|
175
|
+
}
|
42
176
|
|
43
177
|
interface GatewayConfigContext {
|
44
178
|
/**
|
package/dist/index.d.ts
CHANGED
@@ -1,8 +1,98 @@
|
|
1
|
-
import { ExecutionRequest, Executor, MaybePromise, Maybe } from '@graphql-tools/utils';
|
1
|
+
import { ExecutionRequest, Executor, ExecutionResult, MaybePromise, Maybe } from '@graphql-tools/utils';
|
2
2
|
import { Plugin, YogaInitialContext, GraphQLParams } from 'graphql-yoga';
|
3
3
|
import { TransportEntry } from '@graphql-mesh/transport-common';
|
4
4
|
import { Logger, OnFetchHook, MeshFetch, MeshPubSub, KeyValueCache } from '@graphql-mesh/types';
|
5
|
-
import { GraphQLSchema, ExecutionResult } from 'graphql';
|
5
|
+
import { GraphQLSchema, FragmentDefinitionNode, FieldNode, GraphQLResolveInfo, SelectionSetNode, GraphQLOutputType, GraphQLFieldResolver, OperationTypeNode, GraphQLError, SelectionNode, ExecutionResult as ExecutionResult$1 } from 'graphql';
|
6
|
+
import DataLoader from 'dataloader';
|
7
|
+
import { GraphQLResolveInfo as GraphQLResolveInfo$1, GraphQLOutputType as GraphQLOutputType$1 } from 'graphql/type';
|
8
|
+
|
9
|
+
type SchemaTransform<TContext = Record<any, string>> = (originalWrappingSchema: GraphQLSchema, subschemaConfig: SubschemaConfig<any, any, any, TContext>) => GraphQLSchema;
|
10
|
+
type RequestTransform<T = Record<string, any>, TContext = Record<any, string>> = (originalRequest: ExecutionRequest, delegationContext: DelegationContext<TContext>, transformationContext: T) => ExecutionRequest;
|
11
|
+
type ResultTransform<T = Record<string, any>, TContext = Record<any, string>> = (originalResult: ExecutionResult, delegationContext: DelegationContext<TContext>, transformationContext: T) => ExecutionResult;
|
12
|
+
interface Transform<T = any, TContext = Record<string, any>> {
|
13
|
+
transformSchema?: SchemaTransform<TContext>;
|
14
|
+
transformRequest?: RequestTransform<T, TContext>;
|
15
|
+
transformResult?: ResultTransform<T, TContext>;
|
16
|
+
}
|
17
|
+
interface DelegationContext<TContext = Record<string, any>> {
|
18
|
+
subschema: GraphQLSchema | SubschemaConfig<any, any, any, TContext>;
|
19
|
+
subschemaConfig?: SubschemaConfig<any, any, any, TContext>;
|
20
|
+
targetSchema: GraphQLSchema;
|
21
|
+
operation: OperationTypeNode;
|
22
|
+
fieldName: string;
|
23
|
+
args?: Record<string, any>;
|
24
|
+
context?: TContext;
|
25
|
+
info?: GraphQLResolveInfo;
|
26
|
+
returnType: GraphQLOutputType;
|
27
|
+
onLocatedError?: (originalError: GraphQLError) => GraphQLError;
|
28
|
+
rootValue?: any;
|
29
|
+
transforms: Array<Transform<any, TContext>>;
|
30
|
+
transformedSchema: GraphQLSchema;
|
31
|
+
skipTypeMerging: boolean;
|
32
|
+
}
|
33
|
+
type DelegationPlanBuilder = (schema: GraphQLSchema, sourceSubschema: Subschema<any, any, any, any>, variableValues: Record<string, any>, fragments: Record<string, FragmentDefinitionNode>, fieldNodes: FieldNode[], context?: any, info?: GraphQLResolveInfo) => Array<Map<Subschema, SelectionSetNode>>;
|
34
|
+
interface ICreateProxyingResolverOptions<TContext = Record<string, any>> {
|
35
|
+
subschemaConfig: SubschemaConfig<any, any, any, TContext>;
|
36
|
+
operation?: OperationTypeNode;
|
37
|
+
fieldName?: string;
|
38
|
+
}
|
39
|
+
type CreateProxyingResolverFn<TContext = Record<string, any>> = (options: ICreateProxyingResolverOptions<TContext>) => GraphQLFieldResolver<any, TContext>;
|
40
|
+
interface BatchingOptions<K = any, V = any, C = K> {
|
41
|
+
extensionsReducer?: (mergedExtensions: Record<string, any>, request: ExecutionRequest) => Record<string, any>;
|
42
|
+
dataLoaderOptions?: DataLoader.Options<K, V, C>;
|
43
|
+
}
|
44
|
+
interface SubschemaConfig<K = any, V = any, C = K, TContext = Record<string, any>> {
|
45
|
+
name?: string;
|
46
|
+
schema: GraphQLSchema;
|
47
|
+
createProxyingResolver?: CreateProxyingResolverFn<TContext>;
|
48
|
+
rootValue?: any;
|
49
|
+
transforms?: Array<Transform<any, TContext>>;
|
50
|
+
merge?: Record<string, MergedTypeConfig<any, any, TContext>>;
|
51
|
+
executor?: Executor<TContext>;
|
52
|
+
batch?: boolean;
|
53
|
+
batchingOptions?: BatchingOptions<K, V, C>;
|
54
|
+
}
|
55
|
+
interface MergedTypeConfig<K = any, V = any, TContext = Record<string, any>> extends MergedTypeEntryPoint<K, V, TContext> {
|
56
|
+
entryPoints?: Array<MergedTypeEntryPoint>;
|
57
|
+
fields?: Record<string, MergedFieldConfig>;
|
58
|
+
canonical?: boolean;
|
59
|
+
}
|
60
|
+
interface MergedTypeEntryPoint<K = any, V = any, TContext = Record<string, any>> extends MergedTypeResolverOptions<K, V> {
|
61
|
+
selectionSet?: string;
|
62
|
+
key?: (originalResult: any) => K | PromiseLike<K>;
|
63
|
+
resolve?: MergedTypeResolver<TContext>;
|
64
|
+
}
|
65
|
+
interface MergedTypeResolverOptions<K = any, V = any> {
|
66
|
+
fieldName?: string;
|
67
|
+
args?: (originalResult: any) => Record<string, any>;
|
68
|
+
argsFromKeys?: (keys: ReadonlyArray<K>) => Record<string, any>;
|
69
|
+
valuesFromResults?: (results: any, keys: ReadonlyArray<K>) => Array<V>;
|
70
|
+
dataLoaderOptions?: DataLoader.Options<K, V>;
|
71
|
+
}
|
72
|
+
interface MergedFieldConfig {
|
73
|
+
selectionSet?: string;
|
74
|
+
computed?: boolean;
|
75
|
+
canonical?: boolean;
|
76
|
+
}
|
77
|
+
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;
|
78
|
+
|
79
|
+
interface ISubschema<K = any, V = any, C = K, TContext = Record<string, any>> extends SubschemaConfig<K, V, C, TContext> {
|
80
|
+
transformedSchema: GraphQLSchema;
|
81
|
+
}
|
82
|
+
declare class Subschema<K = any, V = any, C = K, TContext = Record<string, any>> implements ISubschema<K, V, C, TContext> {
|
83
|
+
name?: string;
|
84
|
+
schema: GraphQLSchema;
|
85
|
+
executor?: Executor<TContext>;
|
86
|
+
batch?: boolean;
|
87
|
+
batchingOptions?: BatchingOptions<K, V, C>;
|
88
|
+
createProxyingResolver?: CreateProxyingResolverFn<TContext>;
|
89
|
+
transforms: Array<Transform<any, TContext>>;
|
90
|
+
private _transformedSchema;
|
91
|
+
merge?: Record<string, MergedTypeConfig<any, any, TContext>>;
|
92
|
+
constructor(config: SubschemaConfig<K, V, C, TContext>);
|
93
|
+
get transformedSchema(): GraphQLSchema;
|
94
|
+
set transformedSchema(value: GraphQLSchema);
|
95
|
+
}
|
6
96
|
|
7
97
|
declare module 'graphql' {
|
8
98
|
interface GraphQLResolveInfo {
|
@@ -11,6 +101,8 @@ declare module 'graphql' {
|
|
11
101
|
}
|
12
102
|
interface UnifiedGraphPlugin<TContext> {
|
13
103
|
onSubgraphExecute?: OnSubgraphExecuteHook<TContext>;
|
104
|
+
onDelegationPlan?: OnDelegationPlanHook<TContext>;
|
105
|
+
onDelegationStageExecute?: OnDelegationStageExecuteHook<TContext>;
|
14
106
|
}
|
15
107
|
type OnSubgraphExecuteHook<TContext = any> = (payload: OnSubgraphExecutePayload<TContext>) => MaybePromise<Maybe<OnSubgraphExecuteDoneHook | void>>;
|
16
108
|
interface OnSubgraphExecutePayload<TContext> {
|
@@ -25,20 +117,62 @@ interface OnSubgraphExecutePayload<TContext> {
|
|
25
117
|
logger?: Logger;
|
26
118
|
}
|
27
119
|
interface OnSubgraphExecuteDonePayload {
|
28
|
-
result: AsyncIterable<ExecutionResult> | ExecutionResult;
|
29
|
-
setResult(result: AsyncIterable<ExecutionResult> | ExecutionResult): void;
|
120
|
+
result: AsyncIterable<ExecutionResult$1> | ExecutionResult$1;
|
121
|
+
setResult(result: AsyncIterable<ExecutionResult$1> | ExecutionResult$1): void;
|
30
122
|
}
|
31
123
|
type OnSubgraphExecuteDoneHook = (payload: OnSubgraphExecuteDonePayload) => MaybePromise<Maybe<OnSubgraphExecuteDoneResult | void>>;
|
32
124
|
type OnSubgraphExecuteDoneResultOnNext = (payload: OnSubgraphExecuteDoneOnNextPayload) => MaybePromise<void>;
|
33
125
|
interface OnSubgraphExecuteDoneOnNextPayload {
|
34
|
-
result: ExecutionResult;
|
35
|
-
setResult(result: ExecutionResult): void;
|
126
|
+
result: ExecutionResult$1;
|
127
|
+
setResult(result: ExecutionResult$1): void;
|
36
128
|
}
|
37
129
|
type OnSubgraphExecuteDoneResultOnEnd = () => MaybePromise<void>;
|
38
130
|
type OnSubgraphExecuteDoneResult = {
|
39
131
|
onNext?: OnSubgraphExecuteDoneResultOnNext;
|
40
132
|
onEnd?: OnSubgraphExecuteDoneResultOnEnd;
|
41
133
|
};
|
134
|
+
type OnDelegationPlanHook<TContext> = (payload: OnDelegationPlanHookPayload<TContext>) => Maybe<OnDelegationPlanDoneHook | void>;
|
135
|
+
interface OnDelegationPlanHookPayload<TContext> {
|
136
|
+
supergraph: GraphQLSchema;
|
137
|
+
subgraph: string;
|
138
|
+
sourceSubschema: Subschema<any, any, any, TContext>;
|
139
|
+
typeName: string;
|
140
|
+
variables: Record<string, any>;
|
141
|
+
fragments: Record<string, FragmentDefinitionNode>;
|
142
|
+
fieldNodes: SelectionNode[];
|
143
|
+
context: TContext;
|
144
|
+
requestId?: string;
|
145
|
+
logger?: Logger;
|
146
|
+
info?: GraphQLResolveInfo$1;
|
147
|
+
delegationPlanBuilder: DelegationPlanBuilder;
|
148
|
+
setDelegationPlanBuilder(delegationPlanBuilder: DelegationPlanBuilder): void;
|
149
|
+
}
|
150
|
+
type OnDelegationPlanDoneHook = (payload: OnDelegationPlanDonePayload) => Maybe<void>;
|
151
|
+
interface OnDelegationPlanDonePayload {
|
152
|
+
delegationPlan: ReturnType<DelegationPlanBuilder>;
|
153
|
+
setDelegationPlan: (delegationPlan: ReturnType<DelegationPlanBuilder>) => void;
|
154
|
+
}
|
155
|
+
type OnDelegationStageExecuteHook<TContext> = (payload: OnDelegationStageExecutePayload<TContext>) => Maybe<OnDelegationStageExecuteDoneHook>;
|
156
|
+
interface OnDelegationStageExecutePayload<TContext> {
|
157
|
+
object: any;
|
158
|
+
context: TContext;
|
159
|
+
info: GraphQLResolveInfo$1;
|
160
|
+
subgraph: string;
|
161
|
+
subschema: Subschema<any, any, any, TContext>;
|
162
|
+
selectionSet: SelectionSetNode;
|
163
|
+
key?: any;
|
164
|
+
type: GraphQLOutputType$1;
|
165
|
+
resolver: MergedTypeResolver<TContext>;
|
166
|
+
setResolver: (resolver: MergedTypeResolver<TContext>) => void;
|
167
|
+
typeName: string;
|
168
|
+
requestId?: string;
|
169
|
+
logger?: Logger;
|
170
|
+
}
|
171
|
+
type OnDelegationStageExecuteDoneHook = (payload: OnDelegationStageExecuteDonePayload) => void;
|
172
|
+
interface OnDelegationStageExecuteDonePayload {
|
173
|
+
result: any;
|
174
|
+
setResult: (result: any) => void;
|
175
|
+
}
|
42
176
|
|
43
177
|
interface GatewayConfigContext {
|
44
178
|
/**
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@graphql-mesh/hmac-upstream-signature",
|
3
|
-
"version": "1.2.8-rc-
|
3
|
+
"version": "1.2.8-rc-88d0f3811ad3f789d53b415d411064548cffff4f",
|
4
4
|
"type": "module",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -44,7 +44,7 @@
|
|
44
44
|
"dependencies": {
|
45
45
|
"@graphql-mesh/cross-helpers": "^0.4.7",
|
46
46
|
"@graphql-mesh/store": "^0.103.0",
|
47
|
-
"@graphql-mesh/transport-common": "^0.7.15-rc-
|
47
|
+
"@graphql-mesh/transport-common": "^0.7.15-rc-88d0f3811ad3f789d53b415d411064548cffff4f",
|
48
48
|
"@graphql-mesh/types": "^0.103.0",
|
49
49
|
"@graphql-mesh/utils": "^0.103.0",
|
50
50
|
"@graphql-tools/utils": "^10.5.6",
|
@@ -52,7 +52,7 @@
|
|
52
52
|
"tslib": "^2.4.0"
|
53
53
|
},
|
54
54
|
"devDependencies": {
|
55
|
-
"@graphql-hive/gateway": "1.5.1-rc-
|
55
|
+
"@graphql-hive/gateway": "1.5.1-rc-88d0f3811ad3f789d53b415d411064548cffff4f",
|
56
56
|
"@types/json-stable-stringify": "^1.1.0",
|
57
57
|
"graphql": "^16.9.0",
|
58
58
|
"graphql-yoga": "^5.7.0",
|