@graphql-mesh/hmac-upstream-signature 1.2.7-rc-3c5102f967c304f598fc07267232ac3419c7f2c0 → 1.2.8-alpha-7f3ef56a9fcb3332fc9ec75c9dfeea123b8123e6
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +9 -2
- package/dist/index.d.cts +140 -6
- package/dist/index.d.ts +140 -6
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
@@ -1,13 +1,20 @@
|
|
1
1
|
# @graphql-mesh/hmac-upstream-signature
|
2
2
|
|
3
|
-
## 1.2.
|
3
|
+
## 1.2.8-alpha-7f3ef56a9fcb3332fc9ec75c9dfeea123b8123e6
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- Updated dependencies []:
|
8
|
+
- @graphql-mesh/transport-common@0.7.15-alpha-7f3ef56a9fcb3332fc9ec75c9dfeea123b8123e6
|
9
|
+
|
10
|
+
## 1.2.7
|
4
11
|
|
5
12
|
### Patch Changes
|
6
13
|
|
7
14
|
- [`19bc6a4`](https://github.com/graphql-hive/gateway/commit/19bc6a4c222ff157553785ea16760888cdfe10bb) Thanks [@enisdenjo](https://github.com/enisdenjo)! - `onError` and `onEnd` callbacks when mapping async iterators are invoked only once regardless of how many times throw/return was called on the iterator
|
8
15
|
|
9
16
|
- Updated dependencies [[`73c621d`](https://github.com/graphql-hive/gateway/commit/73c621d98a4e6ca134527e349bc71223c03d06db), [`19bc6a4`](https://github.com/graphql-hive/gateway/commit/19bc6a4c222ff157553785ea16760888cdfe10bb)]:
|
10
|
-
- @graphql-mesh/transport-common@0.7.14
|
17
|
+
- @graphql-mesh/transport-common@0.7.14
|
11
18
|
|
12
19
|
## 1.2.6
|
13
20
|
|
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.
|
3
|
+
"version": "1.2.8-alpha-7f3ef56a9fcb3332fc9ec75c9dfeea123b8123e6",
|
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.102.12",
|
47
|
-
"@graphql-mesh/transport-common": "^0.7.
|
47
|
+
"@graphql-mesh/transport-common": "^0.7.15-alpha-7f3ef56a9fcb3332fc9ec75c9dfeea123b8123e6",
|
48
48
|
"@graphql-mesh/types": "^0.102.12",
|
49
49
|
"@graphql-mesh/utils": "^0.102.12",
|
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.
|
55
|
+
"@graphql-hive/gateway": "1.5.1-alpha-7f3ef56a9fcb3332fc9ec75c9dfeea123b8123e6",
|
56
56
|
"@types/json-stable-stringify": "^1.1.0",
|
57
57
|
"graphql": "^16.9.0",
|
58
58
|
"graphql-yoga": "^5.7.0",
|