diff --git a/.changeset/@graphql-hive_gateway-runtime-770-dependencies.md b/.changeset/@graphql-hive_gateway-runtime-770-dependencies.md new file mode 100644 index 000000000..c92c53c07 --- /dev/null +++ b/.changeset/@graphql-hive_gateway-runtime-770-dependencies.md @@ -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`) diff --git a/packages/runtime/package.json b/packages/runtime/package.json index 138e7cf75..fc1d98c8f 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -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" diff --git a/packages/runtime/src/plugins/useContentEncoding.ts b/packages/runtime/src/plugins/useContentEncoding.ts index 6e74c31b2..b8bd8689c 100644 --- a/packages/runtime/src/plugins/useContentEncoding.ts +++ b/packages/runtime/src/plugins/useContentEncoding.ts @@ -11,7 +11,8 @@ export function useContentEncoding>({ subgraphs, }: UseContentEncodingOpts = {}): GatewayPlugin { if (!subgraphs?.length) { - return useOrigContentEncoding<{}>(); + // @ts-expect-error - Return types are not compatible + return useOrigContentEncoding(); } const compressionAlgorithm: CompressionFormat = 'gzip'; let fetchAPI: FetchAPI; @@ -21,7 +22,10 @@ export function useContentEncoding>({ 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('*')) { diff --git a/packages/runtime/src/types.ts b/packages/runtime/src/types.ts index c645aa9f9..e46934b50 100644 --- a/packages/runtime/src/types.ts +++ b/packages/runtime/src/types.ts @@ -96,7 +96,7 @@ export type GatewayPlugin< onCacheGet?: OnCacheGetHook; onCacheSet?: OnCacheSetHook; onCacheDelete?: OnCacheDeleteHook; - } & Partial; + }; export type OnCacheGetHook = ( payload: OnCacheGetHookEventPayload, diff --git a/yarn.lock b/yarn.lock index aee7099ad..59f668a84 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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: @@ -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" @@ -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 @@ -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"