Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/@graphql-hive_gateway-runtime-770-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@graphql-hive/gateway-runtime': patch
---

dependencies updates:

- Updated dependency [`@whatwg-node/server@^0.10.0` ↗︎](https://www.npmjs.com/package/@whatwg-node/server/v/0.10.0) (from `^0.9.68`, in `dependencies`)
2 changes: 1 addition & 1 deletion packages/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@types/node": "^22.7.5",
"@whatwg-node/disposablestack": "^0.0.6",
"@whatwg-node/promise-helpers": "^1.0.0",
"@whatwg-node/server": "^0.9.68",
"@whatwg-node/server": "^0.10.0",
"graphql-ws": "^6.0.4",
"graphql-yoga": "^5.12.0",
"tslib": "^2.8.1"
Expand Down
8 changes: 6 additions & 2 deletions packages/runtime/src/plugins/useContentEncoding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export function useContentEncoding<TContext extends Record<string, any>>({
subgraphs,
}: UseContentEncodingOpts = {}): GatewayPlugin<TContext> {
if (!subgraphs?.length) {
return useOrigContentEncoding<{}>();
// @ts-expect-error - Return types are not compatible
return useOrigContentEncoding();
}
const compressionAlgorithm: CompressionFormat = 'gzip';
let fetchAPI: FetchAPI;
Expand All @@ -21,7 +22,10 @@ export function useContentEncoding<TContext extends Record<string, any>>({
fetchAPI = yoga.fetchAPI;
},
onPluginInit({ addPlugin }) {
addPlugin(useOrigContentEncoding<{}>());
addPlugin(
// @ts-expect-error - Plugin types do not match
useOrigContentEncoding(),
);
},
onSubgraphExecute({ subgraphName, executionRequest }) {
if (subgraphs.includes(subgraphName) || subgraphs.includes('*')) {
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export type GatewayPlugin<
onCacheGet?: OnCacheGetHook;
onCacheSet?: OnCacheSetHook;
onCacheDelete?: OnCacheDeleteHook;
} & Partial<Disposable | AsyncDisposable>;
};

export type OnCacheGetHook = (
payload: OnCacheGetHookEventPayload,
Expand Down
25 changes: 19 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3320,7 +3320,7 @@ __metadata:
languageName: node
linkType: hard

"@envelop/instruments@npm:^1.0.0":
"@envelop/instruments@npm:1.0.0, @envelop/instruments@npm:^1.0.0":
version: 1.0.0
resolution: "@envelop/instruments@npm:1.0.0"
dependencies:
Expand Down Expand Up @@ -3772,7 +3772,7 @@ __metadata:
"@whatwg-node/disposablestack": "npm:^0.0.6"
"@whatwg-node/fetch": "npm:^0.10.4"
"@whatwg-node/promise-helpers": "npm:^1.0.0"
"@whatwg-node/server": "npm:^0.9.68"
"@whatwg-node/server": "npm:^0.10.0"
fets: "npm:^0.8.4"
graphql: "npm:^16.9.0"
graphql-sse: "npm:^2.5.3"
Expand Down Expand Up @@ -8292,12 +8292,12 @@ __metadata:
languageName: node
linkType: hard

"@whatwg-node/promise-helpers@npm:^1.0.0, @whatwg-node/promise-helpers@npm:^1.2.0, @whatwg-node/promise-helpers@npm:^1.2.1, @whatwg-node/promise-helpers@npm:^1.2.2":
version: 1.2.2
resolution: "@whatwg-node/promise-helpers@npm:1.2.2"
"@whatwg-node/promise-helpers@npm:^1.0.0, @whatwg-node/promise-helpers@npm:^1.2.0, @whatwg-node/promise-helpers@npm:^1.2.1, @whatwg-node/promise-helpers@npm:^1.2.2, @whatwg-node/promise-helpers@npm:^1.2.3":
version: 1.2.4
resolution: "@whatwg-node/promise-helpers@npm:1.2.4"
dependencies:
tslib: "npm:^2.6.3"
checksum: 10c0/fc06f34a91bbb3bc4200acbf4bbdfc49b4e2f5546c12454650e424ba94a1c06d8436fc5cd9d56e7c529fdca9422d824a8409de4099c2acdb2723046688d4c6a7
checksum: 10c0/df62da1c9871506736942d704422436c56d77b0b0110203b8fffffd5750930a8d199eb5d93218a61aeb1f09bf6b315276e7257e19bcebb6f639b4d3a52171870
languageName: node
linkType: hard

Expand All @@ -8312,6 +8312,19 @@ __metadata:
languageName: node
linkType: hard

"@whatwg-node/server@npm:^0.10.0":
version: 0.10.0
resolution: "@whatwg-node/server@npm:0.10.0"
dependencies:
"@envelop/instruments": "npm:1.0.0"
"@whatwg-node/disposablestack": "npm:^0.0.6"
"@whatwg-node/fetch": "npm:^0.10.5"
"@whatwg-node/promise-helpers": "npm:^1.2.3"
tslib: "npm:^2.6.3"
checksum: 10c0/2ce25302d90518b8b263c410a011c3b2fd29a3630d3528041c19002a84639efc6b41f299832b0eecca19ad3f6814998b77a512f17fc0317dc81a5ce29000a1ce
languageName: node
linkType: hard

"@whatwg-node/server@npm:^0.9.55, @whatwg-node/server@npm:^0.9.64, @whatwg-node/server@npm:^0.9.68, @whatwg-node/server@npm:^0.9.71":
version: 0.9.71
resolution: "@whatwg-node/server@npm:0.9.71"
Expand Down
Loading