@graphql-hive/gateway-runtime 2.3.3 → 2.3.4-alpha-571bfdbc8753ac98190e44caff4e5d28038ee232
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/CHANGELOG.md +7 -0
- package/dist/index.cjs +5 -2
- package/dist/index.d.cts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +5 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @graphql-hive/gateway-runtime
|
|
2
2
|
|
|
3
|
+
## 2.3.4-alpha-571bfdbc8753ac98190e44caff4e5d28038ee232
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- Updated dependencies [[`073a078`](https://github.com/graphql-hive/gateway/commit/073a078c8cdbdd4ec33fdb9d3aeb4955fbcfb103)]:
|
|
7
|
+
- @graphql-mesh/fusion-runtime@1.5.0-alpha-571bfdbc8753ac98190e44caff4e5d28038ee232
|
|
8
|
+
- @graphql-mesh/hmac-upstream-signature@2.0.7
|
|
9
|
+
|
|
3
10
|
## 2.3.3
|
|
4
11
|
### Patch Changes
|
|
5
12
|
|
package/dist/index.cjs
CHANGED
|
@@ -2184,7 +2184,9 @@ function createGatewayRuntime(config) {
|
|
|
2184
2184
|
unifiedGraphPlugin = executorPlugin;
|
|
2185
2185
|
readinessChecker = () => promiseHelpers.handleMaybePromise(
|
|
2186
2186
|
() => proxyExecutor({
|
|
2187
|
-
document: graphql.parse(`query ReadinessCheck { __typename }
|
|
2187
|
+
document: graphql.parse(`query ReadinessCheck { __typename }`, {
|
|
2188
|
+
noLocation: true
|
|
2189
|
+
})
|
|
2188
2190
|
}),
|
|
2189
2191
|
(res) => !graphqlYoga.isAsyncIterable(res) && !!res.data?.__typename
|
|
2190
2192
|
);
|
|
@@ -2451,6 +2453,7 @@ function createGatewayRuntime(config) {
|
|
|
2451
2453
|
instrumentedGraphFetcher
|
|
2452
2454
|
)(...args);
|
|
2453
2455
|
const unifiedGraphManager = new fusionRuntime.UnifiedGraphManager({
|
|
2456
|
+
handleUnifiedGraph: config.unifiedGraphHandler,
|
|
2454
2457
|
getUnifiedGraph: unifiedGraphFetcher,
|
|
2455
2458
|
onUnifiedGraphChange(newUnifiedGraph) {
|
|
2456
2459
|
unifiedGraph = newUnifiedGraph;
|
|
@@ -2833,7 +2836,7 @@ function isDynamicUnifiedGraphSchema(schema) {
|
|
|
2833
2836
|
return false;
|
|
2834
2837
|
}
|
|
2835
2838
|
try {
|
|
2836
|
-
graphql.parse(schema);
|
|
2839
|
+
graphql.parse(schema, { noLocation: true });
|
|
2837
2840
|
return false;
|
|
2838
2841
|
} catch (e) {
|
|
2839
2842
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -8,8 +8,8 @@ export { ResolveUserFn, ValidateUserFn } from '@envelop/generic-auth';
|
|
|
8
8
|
import { Logger, LogLevel } from '@graphql-hive/logger';
|
|
9
9
|
export * from '@graphql-hive/logger';
|
|
10
10
|
import { PubSub } from '@graphql-hive/pubsub';
|
|
11
|
-
import { UnifiedGraphManagerOptions, UnifiedGraphPlugin, Instrumentation as Instrumentation$2, Transports, TransportEntryAdditions, BatchDelegateOptions, OnSubgraphExecuteHook } from '@graphql-mesh/fusion-runtime';
|
|
12
|
-
export { TransportEntryAdditions, getExecutorForUnifiedGraph, getSdkRequesterForUnifiedGraph } from '@graphql-mesh/fusion-runtime';
|
|
11
|
+
import { UnifiedGraphManagerOptions, UnifiedGraphPlugin, Instrumentation as Instrumentation$2, Transports, TransportEntryAdditions, BatchDelegateOptions, UnifiedGraphHandler, OnSubgraphExecuteHook } from '@graphql-mesh/fusion-runtime';
|
|
12
|
+
export { TransportEntryAdditions, UnifiedGraphHandler, UnifiedGraphPlugin, getExecutorForUnifiedGraph, getSdkRequesterForUnifiedGraph } from '@graphql-mesh/fusion-runtime';
|
|
13
13
|
import { HMACUpstreamSignatureOptions } from '@graphql-mesh/hmac-upstream-signature';
|
|
14
14
|
export * from '@graphql-mesh/hmac-upstream-signature';
|
|
15
15
|
import { ResponseCacheConfig } from '@graphql-mesh/plugin-response-cache';
|
|
@@ -354,6 +354,16 @@ interface GatewayConfigSupergraph<TContext extends Record<string, any> = Record<
|
|
|
354
354
|
* });
|
|
355
355
|
*/
|
|
356
356
|
progressiveOverride?: ProgressiveOverrideHandler;
|
|
357
|
+
/**
|
|
358
|
+
* Custom handler for the unified graph which is responsible for planning the
|
|
359
|
+
* execution of federated queries.
|
|
360
|
+
*
|
|
361
|
+
* This option allows to provide a completely custom implementation of the unified graph handler.
|
|
362
|
+
* It can be used to implement custom federation behavior or to integrate with other systems.
|
|
363
|
+
*
|
|
364
|
+
* @experimental This option is experimental and may change in the future.
|
|
365
|
+
*/
|
|
366
|
+
unifiedGraphHandler?: UnifiedGraphHandler;
|
|
357
367
|
}
|
|
358
368
|
type ProgressiveOverrideHandler = (label: string, context: GatewayContext) => MaybePromise<boolean>;
|
|
359
369
|
interface GatewayConfigSubgraph<TContext extends Record<string, any> = Record<string, any>> extends GatewayConfigSchemaBase<TContext> {
|
package/dist/index.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ export { ResolveUserFn, ValidateUserFn } from '@envelop/generic-auth';
|
|
|
8
8
|
import { Logger, LogLevel } from '@graphql-hive/logger';
|
|
9
9
|
export * from '@graphql-hive/logger';
|
|
10
10
|
import { PubSub } from '@graphql-hive/pubsub';
|
|
11
|
-
import { UnifiedGraphManagerOptions, UnifiedGraphPlugin, Instrumentation as Instrumentation$2, Transports, TransportEntryAdditions, BatchDelegateOptions, OnSubgraphExecuteHook } from '@graphql-mesh/fusion-runtime';
|
|
12
|
-
export { TransportEntryAdditions, getExecutorForUnifiedGraph, getSdkRequesterForUnifiedGraph } from '@graphql-mesh/fusion-runtime';
|
|
11
|
+
import { UnifiedGraphManagerOptions, UnifiedGraphPlugin, Instrumentation as Instrumentation$2, Transports, TransportEntryAdditions, BatchDelegateOptions, UnifiedGraphHandler, OnSubgraphExecuteHook } from '@graphql-mesh/fusion-runtime';
|
|
12
|
+
export { TransportEntryAdditions, UnifiedGraphHandler, UnifiedGraphPlugin, getExecutorForUnifiedGraph, getSdkRequesterForUnifiedGraph } from '@graphql-mesh/fusion-runtime';
|
|
13
13
|
import { HMACUpstreamSignatureOptions } from '@graphql-mesh/hmac-upstream-signature';
|
|
14
14
|
export * from '@graphql-mesh/hmac-upstream-signature';
|
|
15
15
|
import { ResponseCacheConfig } from '@graphql-mesh/plugin-response-cache';
|
|
@@ -354,6 +354,16 @@ interface GatewayConfigSupergraph<TContext extends Record<string, any> = Record<
|
|
|
354
354
|
* });
|
|
355
355
|
*/
|
|
356
356
|
progressiveOverride?: ProgressiveOverrideHandler;
|
|
357
|
+
/**
|
|
358
|
+
* Custom handler for the unified graph which is responsible for planning the
|
|
359
|
+
* execution of federated queries.
|
|
360
|
+
*
|
|
361
|
+
* This option allows to provide a completely custom implementation of the unified graph handler.
|
|
362
|
+
* It can be used to implement custom federation behavior or to integrate with other systems.
|
|
363
|
+
*
|
|
364
|
+
* @experimental This option is experimental and may change in the future.
|
|
365
|
+
*/
|
|
366
|
+
unifiedGraphHandler?: UnifiedGraphHandler;
|
|
357
367
|
}
|
|
358
368
|
type ProgressiveOverrideHandler = (label: string, context: GatewayContext) => MaybePromise<boolean>;
|
|
359
369
|
interface GatewayConfigSubgraph<TContext extends Record<string, any> = Record<string, any>> extends GatewayConfigSchemaBase<TContext> {
|
package/dist/index.js
CHANGED
|
@@ -2183,7 +2183,9 @@ function createGatewayRuntime(config) {
|
|
|
2183
2183
|
unifiedGraphPlugin = executorPlugin;
|
|
2184
2184
|
readinessChecker = () => handleMaybePromise(
|
|
2185
2185
|
() => proxyExecutor({
|
|
2186
|
-
document: parse(`query ReadinessCheck { __typename }
|
|
2186
|
+
document: parse(`query ReadinessCheck { __typename }`, {
|
|
2187
|
+
noLocation: true
|
|
2188
|
+
})
|
|
2187
2189
|
}),
|
|
2188
2190
|
(res) => !isAsyncIterable$1(res) && !!res.data?.__typename
|
|
2189
2191
|
);
|
|
@@ -2450,6 +2452,7 @@ function createGatewayRuntime(config) {
|
|
|
2450
2452
|
instrumentedGraphFetcher
|
|
2451
2453
|
)(...args);
|
|
2452
2454
|
const unifiedGraphManager = new UnifiedGraphManager({
|
|
2455
|
+
handleUnifiedGraph: config.unifiedGraphHandler,
|
|
2453
2456
|
getUnifiedGraph: unifiedGraphFetcher,
|
|
2454
2457
|
onUnifiedGraphChange(newUnifiedGraph) {
|
|
2455
2458
|
unifiedGraph = newUnifiedGraph;
|
|
@@ -2832,7 +2835,7 @@ function isDynamicUnifiedGraphSchema(schema) {
|
|
|
2832
2835
|
return false;
|
|
2833
2836
|
}
|
|
2834
2837
|
try {
|
|
2835
|
-
parse(schema);
|
|
2838
|
+
parse(schema, { noLocation: true });
|
|
2836
2839
|
return false;
|
|
2837
2840
|
} catch (e) {
|
|
2838
2841
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-hive/gateway-runtime",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.4-alpha-571bfdbc8753ac98190e44caff4e5d28038ee232",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@graphql-hive/signal": "^2.0.0",
|
|
56
56
|
"@graphql-hive/yoga": "^0.42.2",
|
|
57
57
|
"@graphql-mesh/cross-helpers": "^0.4.10",
|
|
58
|
-
"@graphql-mesh/fusion-runtime": "
|
|
58
|
+
"@graphql-mesh/fusion-runtime": "1.5.0-alpha-571bfdbc8753ac98190e44caff4e5d28038ee232",
|
|
59
59
|
"@graphql-mesh/hmac-upstream-signature": "^2.0.7",
|
|
60
60
|
"@graphql-mesh/plugin-response-cache": "^0.104.18",
|
|
61
61
|
"@graphql-mesh/transport-common": "^1.0.11",
|