Releases: graphql-hive/gateway
December 31, 2024
@graphql-tools/[email protected]
Patch Changes
-
#382
21e1f05
Thanks @ardatan! - Memoize the batched delegation loader by respecting the arguments correctly
@graphql-tools/[email protected]
Patch Changes
- Updated dependencies []:
- @graphql-tools/[email protected]
@graphql-mesh/[email protected]
Patch Changes
- Updated dependencies []:
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
@graphql-mesh/[email protected]
Patch Changes
- Updated dependencies []:
- @graphql-hive/[email protected]
December 26, 2024
@graphql-tools/[email protected]
Patch Changes
-
#381
55eb1b4
Thanks @ardatan! - This is a bugfix with some internal changes, no user action is needed. This bugfix and improvement is done to improve the stability of some components of the gateway;Like HMAC Upstream Signature plugin, different components of the gateway were using different ways of serializing the execution request.
Some of them were ignoringvariables
if it is empty, some of not, this was causing the signature generation to be different for the same query.
For example, it was working as expected in Proxy mode, but not working as expected in Federation Gateway mode.With this change, now we have a shared helper to serialize the upstream execution request with a memoized
print
function for query AST etc to have a consistent serialization so consistent signature generation for HMAC.For example instead of using
print
, you should usedefaultPrintFn
that memoizesprint
operation and also used the string version of it parsed before by Envelop/Yoga.-import { print } from 'graphql'; -const query = print(parsedQuery); +import { defaultPrintFn } from '@graphql-tools/executor-common'; +const query = defaultPrintFn(parsedQuery);
Or instead of creating objects from
ExecutionRequest
, useserializeExecutionRequest
helper.-const serializedRequest = { - query: print(executionRequest.document), - variables: executionRequest.variables, - operationName: executionRequest.operationName, - extensions: executionRequest.extensions, -}; +import { serializeExecutionRequest } from '@graphql-tools/executor-common'; +const serializedRequest = serializeExecutionRequest(executionRequest);
@graphql-tools/[email protected]
Patch Changes
-
#381
55eb1b4
Thanks @ardatan! - dependencies updates:- Added dependency
@graphql-tools/executor-common@workspace:^
↗︎ (todependencies
)
- Added dependency
-
#381
55eb1b4
Thanks @ardatan! - This is a bugfix with some internal changes, no user action is needed. This bugfix and improvement is done to improve the stability of some components of the gateway;Like HMAC Upstream Signature plugin, different components of the gateway were using different ways of serializing the execution request.
Some of them were ignoringvariables
if it is empty, some of not, this was causing the signature generation to be different for the same query.
For example, it was working as expected in Proxy mode, but not working as expected in Federation Gateway mode.With this change, now we have a shared helper to serialize the upstream execution request with a memoized
print
function for query AST etc to have a consistent serialization so consistent signature generation for HMAC.For example instead of using
print
, you should usedefaultPrintFn
that memoizesprint
operation and also used the string version of it parsed before by Envelop/Yoga.-import { print } from 'graphql'; -const query = print(parsedQuery); +import { defaultPrintFn } from '@graphql-tools/executor-common'; +const query = defaultPrintFn(parsedQuery);
Or instead of creating objects from
ExecutionRequest
, useserializeExecutionRequest
helper.-const serializedRequest = { - query: print(executionRequest.document), - variables: executionRequest.variables, - operationName: executionRequest.operationName, - extensions: executionRequest.extensions, -}; +import { serializeExecutionRequest } from '@graphql-tools/executor-common'; +const serializedRequest = serializeExecutionRequest(executionRequest);
-
Updated dependencies [
55eb1b4
]:- @graphql-tools/[email protected]
@graphql-tools/[email protected]
Patch Changes
-
#381
55eb1b4
Thanks @ardatan! - dependencies updates:- Added dependency
@graphql-tools/executor-common@workspace:^
↗︎ (todependencies
)
- Added dependency
-
#381
55eb1b4
Thanks @ardatan! - This is a bugfix with some internal changes, no user action is needed. This bugfix and improvement is done to improve the stability of some components of the gateway;Like HMAC Upstream Signature plugin, different components of the gateway were using different ways of serializing the execution request.
Some of them were ignoringvariables
if it is empty, some of not, this was causing the signature generation to be different for the same query.
For example, it was working as expected in Proxy mode, but not working as expected in Federation Gateway mode.With this change, now we have a shared helper to serialize the upstream execution request with a memoized
print
function for query AST etc to have a consistent serialization so consistent signature generation for HMAC.For example instead of using
print
, you should usedefaultPrintFn
that memoizesprint
operation and also used the string version of it parsed before by Envelop/Yoga.-import { print } from 'graphql'; -const query = print(parsedQuery); +import { defaultPrintFn } from '@graphql-tools/executor-common'; +const query = defaultPrintFn(parsedQuery);
Or instead of creating objects from
ExecutionRequest
, useserializeExecutionRequest
helper.-const serializedRequest = { - query: print(executionRequest.document), - variables: executionRequest.variables, - operationName: executionRequest.operationName, - extensions: executionRequest.extensions, -}; +import { serializeExecutionRequest } from '@graphql-tools/executor-common'; +const serializedRequest = serializeExecutionRequest(executionRequest);
-
Updated dependencies [
55eb1b4
]:- @graphql-tools/[email protected]
@graphql-tools/[email protected]
Patch Changes
- Updated dependencies [
55eb1b4
,55eb1b4
]:- @graphql-tools/[email protected]
@graphql-mesh/[email protected]
Patch Changes
- Updated dependencies [
55eb1b4
,55eb1b4
]:- @graphql-mesh/[email protected]
- @graphql-tools/[email protected]
@graphql-hive/[email protected]
Patch Changes
- Updated dependencies [
55eb1b4
,55eb1b4
,55eb1b4
]:- @graphql-mesh/[email protected]
- @graphql-mesh/[email protected]
- @graphql-mesh/[email protected]
- @graphql-mesh/[email protected]
- @graphql-hive/[email protected]
- @graphql-mesh/[email protected]
- @graphql-mesh/[email protected]
@graphql-mesh/[email protected]
Patch Changes
-
#381
55eb1b4
Thanks @ardatan! - dependencies updates:- Added dependency
@graphql-tools/executor-common@workspace:^
↗︎ (todependencies
) - Removed dependency
@graphql-mesh/transport-common@workspace:^
↗︎ (fromdependencies
)
- Added dependency
-
#381
55eb1b4
Thanks @ardatan! - This is a bugfix with some internal changes, no user action is needed. This bugfix and improvement is done to improve the stability of some components of the gateway;Like HMAC Upstream Signature plugin, different components of the gateway were using different ways of serializing the execution request.
Some of them were ignoringvariables
if it is empty, some of not, this was causing the signature generation to be different for the same query.
For example, it was working as expected in Proxy mode, but not working as expected in Federation Gateway mode.With this chan...
[email protected]
Pre-built binaries of the Hive Gateway for the @graphql-hive/[email protected] release.
December 24, 2024
@graphql-hive/[email protected]
Patch Changes
-
#373
e606975
Thanks @ardatan! - dependencies updates:- Added dependency
@graphql-tools/utils@^10.7.0
↗︎ (todependencies
) - Added dependency
graphql@^16.9.0 || ^17.0.0
↗︎ (topeerDependencies
)
- Added dependency
-
#373
e606975
Thanks @ardatan! - UseregisterAbortSignalListener
helper function to register event listeners toAbortSignal
instances to avoid warning on Node.js like
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 abort listeners added. Use emitter.setMaxListeners() to increase limit
.
@graphql-tools/[email protected]
Patch Changes
-
#373
e606975
Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^10.7.0
↗︎ (from^10.6.2
, independencies
)
- Updated dependency
-
Updated dependencies [
e606975
]:- @graphql-tools/[email protected]
@graphql-tools/[email protected]
Patch Changes
-
#373
e606975
Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^10.7.0
↗︎ (from^10.6.2
, independencies
)
- Updated dependency
@graphql-tools/[email protected]
Patch Changes
-
#373
e606975
Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/executor@^1.3.10
↗︎ (from^1.3.8
, independencies
) - Updated dependency
@graphql-tools/utils@^10.7.0
↗︎ (from^10.6.2
, independencies
)
- Updated dependency
-
Updated dependencies [
e606975
]:- @graphql-tools/[email protected]
@graphql-tools/[email protected]
Patch Changes
-
#373
e606975
Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^10.7.0
↗︎ (from^10.6.2
, independencies
)
- Updated dependency
@graphql-tools/[email protected]
Patch Changes
-
#373
e606975
Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^10.7.0
↗︎ (from^10.6.2
, independencies
)
- Updated dependency
-
#367
15975c2
Thanks @ardatan! - Fix the combination ofupstreamRetry
andupstreamTimeout
togetherWhen you use
upstreamRetry
andupstreamTimeout
together, theupstreamRetry
wasn't applied properly when the request is timed out withupstreamTimeout
. -
Updated dependencies [
e606975
,e606975
]:- @graphql-hive/[email protected]
@graphql-tools/[email protected]
Patch Changes
-
#373
e606975
Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^10.7.0
↗︎ (from^10.6.2
, independencies
)
- Updated dependency
-
Updated dependencies [
e606975
,e606975
,e606975
,e606975
,15975c2
]:- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
@graphql-mesh/[email protected]
Patch Changes
-
#373
e606975
Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/executor@^1.3.10
↗︎ (from^1.3.6
, independencies
) - Updated dependency
@graphql-tools/utils@^10.7.0
↗︎ (from^10.6.2
, independencies
)
- Updated dependency
-
#367
15975c2
Thanks @ardatan! - Fix the combination ofupstreamRetry
andupstreamTimeout
togetherWhen you use
upstreamRetry
andupstreamTimeout
together, theupstreamRetry
wasn't applied properly when the request is timed out withupstreamTimeout
. -
Updated dependencies [
e606975
,e606975
,e606975
,e606975
,e606975
,e606975
,15975c2
]:- @graphql-mesh/[email protected]
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
@graphql-hive/[email protected]
Patch Changes
-
#373
e606975
Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^10.7.0
↗︎ (from^10.6.2
, independencies
)
- Updated dependency
-
Updated dependencies [
e606975
,e606975
,e606975
,e606975
,e606975
,e606975
,e606975
,15975c2
,e606975
]:- @graphql-hive/[email protected]
- @graphql-mesh/[email protected]
- @graphql-mesh/[email protected]
- @graphql-mesh/[email protected]
- @graphql-mesh/[email protected]
- @graphql-mesh/[email protected]
- @graphql-mesh/[email protected]
@graphql-mesh/[email protected]
Patch Changes
-
#373
e606975
Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/utils@^10.7.0
↗︎ (from^10.6.2
, independencies
)
- Updated dependency
-
U...
December 24, 2024
@graphql-mesh/[email protected]
Patch Changes
-
#357
8b64103
Thanks @ardatan! - Fix the bug on setting the default polling interval to 10 seconds
So by default, the gateway will poll the schema every 10 seconds, and update the schema if it has changed.This PR also contains improvements on logging about polling
@graphql-hive/[email protected]
Patch Changes
-
#357
8b64103
Thanks @ardatan! - Fix the bug on setting the default polling interval to 10 seconds
So by default, the gateway will poll the schema every 10 seconds, and update the schema if it has changed.This PR also contains improvements on logging about polling
-
#342
2f59fce
Thanks @ardatan! - Respect both registry token from CLI arguments and the configuration in the `gateway.config`User can provide the token in the CLI arguments, and have some registry configuration in `gateway.config`
-
Updated dependencies [
7a1877a
,8b64103
,122c013
,2f59fce
]:- @graphql-mesh/[email protected]
- @graphql-hive/[email protected]
- @graphql-mesh/[email protected]
- @graphql-mesh/[email protected]
@graphql-mesh/[email protected]
Patch Changes
-
#352
7a1877a
Thanks @renovate! - dependencies updates:- Updated dependency
@opentelemetry/exporter-trace-otlp-grpc@^0.57.0
↗︎ (from^0.56.0
, independencies
) - Updated dependency
@opentelemetry/exporter-trace-otlp-http@^0.57.0
↗︎ (from^0.56.0
, independencies
) - Updated dependency
@opentelemetry/instrumentation@^0.57.0
↗︎ (from^0.56.0
, independencies
)
- Updated dependency
-
Updated dependencies [
8b64103
,122c013
,2f59fce
]:- @graphql-hive/[email protected]
@graphql-mesh/[email protected]
Patch Changes
- Updated dependencies [
8b64103
,122c013
,2f59fce
]:- @graphql-hive/[email protected]
@graphql-hive/[email protected]
Patch Changes
-
#357
8b64103
Thanks @ardatan! - Fix the bug on setting the default polling interval to 10 seconds
So by default, the gateway will poll the schema every 10 seconds, and update the schema if it has changed.This PR also contains improvements on logging about polling
-
#356
122c013
Thanks @ardatan! - Better messages on debug logs of readiness check endpoint;Before;
On successful readiness check, the gateway was logging the following message:Readiness check passed: Supergraph loaded
Because this makes the users think it was just loaded.
After;
On successful readiness check, the gateway will log the following message:Readiness check passed because supergraph has been loaded already
On failed readiness check, the gateway was logging the following message:
Before;Readiness check failed: Supergraph not loaded
It should make the users think it was not loaded or there is an issue with the supergraph.
After;
Readiness check failed because supergraph has not been loaded yet or failed to load
-
#342
2f59fce
Thanks @ardatan! -token
doesn't need to be required for Hive reporting in the configuration because it can be provided by the arguments -
Updated dependencies [
8b64103
]:- @graphql-mesh/[email protected]
- @graphql-mesh/[email protected]
[email protected]
Pre-built binaries of the Hive Gateway for the @graphql-hive/[email protected] release.
[email protected]
Pre-built binaries of the Hive Gateway for the @graphql-hive/[email protected] release.
December 14, 2024
@graphql-tools/[email protected]
Patch Changes
-
#333
0d81307
Thanks @renovate! - dependencies updates:- Updated dependency
@graphql-yoga/typed-event-target@^3.0.1
↗︎ (from^3.0.0
, independencies
)
- Updated dependency
@graphql-mesh/[email protected]
Patch Changes
-
#333
0d81307
Thanks @renovate! - dependencies updates:- Updated dependency
graphql-yoga@^5.10.6
↗︎ (from^5.10.4
, independencies
)
- Updated dependency
-
Updated dependencies [
0d81307
]:- @graphql-tools/[email protected]
@graphql-hive/[email protected]
Patch Changes
-
#333
0d81307
Thanks @renovate! - dependencies updates:- Updated dependency
graphql-yoga@^5.10.6
↗︎ (from^5.10.4
, independencies
)
- Updated dependency
-
Updated dependencies [
0d81307
,0d81307
]:- @graphql-hive/[email protected]
- @graphql-mesh/[email protected]
- @graphql-mesh/[email protected]
- @graphql-mesh/[email protected]
@graphql-mesh/[email protected]
Patch Changes
- Updated dependencies [
0d81307
]:- @graphql-hive/[email protected]
@graphql-mesh/[email protected]
Patch Changes
-
#333
0d81307
Thanks @renovate! - dependencies updates:- Updated dependency
@graphql-yoga/plugin-prometheus@^6.5.3
↗︎ (from^6.5.0
, independencies
) - Updated dependency
graphql-yoga@^5.10.6
↗︎ (from^5.10.4
, inpeerDependencies
)
- Updated dependency
-
Updated dependencies [
0d81307
]:- @graphql-hive/[email protected]
@graphql-hive/[email protected]
Patch Changes
-
#333
0d81307
Thanks @renovate! - dependencies updates:- Updated dependency
@graphql-yoga/plugin-apollo-usage-report@^0.5.3
↗︎ (from^0.5.0
, independencies
) - Updated dependency
@graphql-yoga/plugin-csrf-prevention@^3.10.6
↗︎ (from^3.7.0
, independencies
) - Updated dependency
@graphql-yoga/plugin-defer-stream@^3.10.6
↗︎ (from^3.7.0
, independencies
) - Updated dependency
@graphql-yoga/plugin-persisted-operations@^3.10.6
↗︎ (from^3.7.0
, independencies
) - Updated dependency
graphql-yoga@^5.10.6
↗︎ (from^5.10.4
, independencies
)
- Updated dependency
-
Updated dependencies [
0d81307
,0d81307
]:- @graphql-mesh/[email protected]
- @graphql-tools/[email protected]
- @graphql-mesh/[email protected]
[email protected]
Pre-built binaries of the Hive Gateway for the @graphql-hive/[email protected] release.
December 13, 2024
@graphql-hive/[email protected]
Patch Changes
@graphql-tools/[email protected]
Patch Changes
- Updated dependencies [
23b8987
]:- @graphql-tools/[email protected]
@graphql-tools/[email protected]
Patch Changes
-
#322
23b8987
Thanks @ardatan! - dependencies updates:- Updated dependency
@graphql-tools/executor@^1.3.8
↗︎ (from^1.3.6
, independencies
)
- Updated dependency
@graphql-tools/[email protected]
Patch Changes
-
#322
23b8987
Thanks @ardatan! - dependencies updates:- Added dependency
@graphql-hive/gateway-abort-signal-any@workspace:^
↗︎ (todependencies
)
- Added dependency
-
Updated dependencies [
23b8987
]:- @graphql-hive/[email protected]
@graphql-tools/[email protected]
Patch Changes
- Updated dependencies [
23b8987
,23b8987
]:- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
@graphql-mesh/[email protected]
Patch Changes
- Updated dependencies [
23b8987
,23b8987
]:- @graphql-mesh/[email protected]
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
@graphql-hive/[email protected]
Minor Changes
-
#322
23b8987
Thanks @ardatan! - New Retry and Timeout plugins;- Retry plugin: Retry a request if it fails
It respects the
Retry-After
HTTP header, See more about this HTTPexport const gatewayConfig = defineConfig({ upstreamRetry: { // The maximum number of retries to attempt. maxRetries: 3, // required // The delay between retries in milliseconds. retryDelay: 1000, // default /** * A function that determines whether a response should be retried. * If the upstream returns `Retry-After` header, the request will be retried. */ shouldRetry: ({ response }) => response?.status >= 500 || response?.status === 429 } // or you can configure it by subgraph name upstreamRetry({ subgraphName }) { if (subgraphName === 'my-rate-limited-subgraph') { return { maxRetries: 3, } } return { maxRetries: 10 } } })
- Timeout plugin: Timeout a request if it takes too long
export const gatewayConfig = defineConfig({ // The maximum time in milliseconds to wait for a response from the upstream. upstreamTimeout: 1000, // required // or you can configure it by subgraph name upstreamTimeout({ subgraphName }) { if (subgraphName === 'my-slow-subgraph') { return 1000; } }, });
Patch Changes
- Updated dependencies [
23b8987
,23b8987
]:- @graphql-hive/[email protected]
- @graphql-mesh/[email protected]
- @graphql-mesh/[email protected]
- @graphql-mesh/[email protected]
- @graphql-mesh/[email protected]
- @graphql-mesh/[email protected]
- @graphql-mesh/[email protected]
@graphql-mesh/[email protected]
Patch Changes
- Updated dependencies [
23b8987
]:- @graphql-mesh/[email protected]
@graphql-mesh/[email protected]
Patch Changes
- Updated dependencies [
23b8987
,23b8987
,23b8987
]:- @graphql-hive/[email protected]
- @graphql-mesh/[email protected]
@graphql-mesh/[email protected]
Patch Changes
- Updated dependencies [
23b8987
,23b8987
]:- @graphql-hive/[email protected]
@graphql-hive/[email protected]
Minor Changes
-
#322
23b8987
Thanks @ardatan! - New Retry and Timeout plugins;- Retry plugin: Retry a request if it fails
It respects the
Retry-After
HTTP header, See more about this HTTPexport const gatewayConfig = defineConfig({ upstreamRetry: { // The maximum number of retries to attempt. maxRetries: 3, // required // The delay between retries in milliseconds. retryDelay: 1000, // default /** * A function that determines whether a response should be retried. * If the upstream returns `Retry-After` header, the request will be retried. */ shouldRetry: ({ response }) => response?.status >= 500 || response?.status === 429 } // or you can configure it by subgraph name upstreamRetry({ subgraphName }) { if (subgraphName === 'my-rate-limited-subgraph') { return { maxRetries: 3, } } return { maxRetries: 10 } } })
- Timeout plugin: Timeout a request if it takes too long
export const gatewayConfig = defineConfig({ // The maximum time in milliseconds to wait for a response from the upstream. upstreamTimeout: 1000, // required // or you can configure it by subgraph name upstreamTimeout({ subgraphName }) { if (subgraphName === 'my-slow-subgraph') { return 1000; } }, });
Patch Changes
-
#322
23b8987
Thanks @ardatan! - dependencies updates:- Added dependency
@graphql-hive/gateway-abort-signal-any@workspace:^
↗︎ (todependencies
)
- Added dependency
-
Updated dependencies [
23b8987
,23b8987
,23b8987
,23b8987
]:- @graphql-mesh/[email protected]
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
- @graphql-hive/[email protected]
- @graphql-mesh/[email protected]
- @graphql-mesh/[email protected]
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
@graphql-tools/[email protected]
Patch Changes
- Updated dependencies [
23b8987
]:- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
@graphql-tools/[email protected]
Patch Changes
- Updated dependencies [
23b8987
]:- @graphql-tools/[email protected]
@graphql-mesh/[email protected]
Patch Changes
- #322 [
23b8987
](https://github.com/graphql-hiv...