@graphql-hive/gateway 2.2.0-rc-389a7c75fe7d3ab97a440fa356a38823e93abd9b → 2.2.0-rc-804105972c99ff73702f9a1261d6df0707de5e4a
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 +16 -5
- package/dist/bin.cjs +3 -2
- package/dist/bin.js +3 -2
- package/dist/{cli-B-xjzGm6.cjs → cli-DhpSD4Os.cjs} +13 -11
- package/dist/{cli-iuPgpffC.js → cli-Q4Ki2Qs_.js} +5 -3
- package/dist/index.cjs +2 -1
- package/dist/index.js +2 -1
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @graphql-hive/gateway
|
|
2
2
|
|
|
3
|
-
## 2.2.0-rc-
|
|
3
|
+
## 2.2.0-rc-804105972c99ff73702f9a1261d6df0707de5e4a
|
|
4
4
|
### Minor Changes
|
|
5
5
|
|
|
6
6
|
|
|
@@ -20,12 +20,23 @@
|
|
|
20
20
|
|
|
21
21
|
### Patch Changes
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
- [#1804](https://github.com/graphql-hive/gateway/pull/1804) [`c913e6c`](https://github.com/graphql-hive/gateway/commit/c913e6cfec407d4d2da5b264d38047a9df8e09f0) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
|
|
26
|
+
|
|
27
|
+
- Added dependency [`@whatwg-node/server@^0.10.17` ↗︎](https://www.npmjs.com/package/@whatwg-node/server/v/0.10.17) (to `dependencies`)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
- [#1804](https://github.com/graphql-hive/gateway/pull/1804) [`c913e6c`](https://github.com/graphql-hive/gateway/commit/c913e6cfec407d4d2da5b264d38047a9df8e09f0) Thanks [@ardatan](https://github.com/ardatan)! - Fixes for better support of the plugin system in WebSockets;
|
|
31
|
+
|
|
32
|
+
- Ensure `params: GraphQLParams` and `request: Request` exist in the context
|
|
33
|
+
- Invoke `onParams` and `onExecutionResult` hooks from plugins properly
|
|
34
|
+
- Updated dependencies [[`15b9e50`](https://github.com/graphql-hive/gateway/commit/15b9e5037fa74f8c1a8e662e196268a88642c27d), [`abd350b`](https://github.com/graphql-hive/gateway/commit/abd350b913c8938cf173a4a5e25b3ba6c04016fc), [`c913e6c`](https://github.com/graphql-hive/gateway/commit/c913e6cfec407d4d2da5b264d38047a9df8e09f0), [`071b1e0`](https://github.com/graphql-hive/gateway/commit/071b1e0e5a8cc04bc2815fd8e77c5549727f7bb7), [`071b1e0`](https://github.com/graphql-hive/gateway/commit/071b1e0e5a8cc04bc2815fd8e77c5549727f7bb7), [`a50d93a`](https://github.com/graphql-hive/gateway/commit/a50d93a0bc8f3c67de7449ad9102d3f3b60ea96a), [`071b1e0`](https://github.com/graphql-hive/gateway/commit/071b1e0e5a8cc04bc2815fd8e77c5549727f7bb7)]:
|
|
35
|
+
- @graphql-hive/gateway-runtime@2.5.0-rc-804105972c99ff73702f9a1261d6df0707de5e4a
|
|
36
|
+
- @graphql-hive/plugin-opentelemetry@1.3.0-rc-804105972c99ff73702f9a1261d6df0707de5e4a
|
|
26
37
|
- @graphql-hive/plugin-aws-sigv4@2.0.20
|
|
27
38
|
- @graphql-mesh/hmac-upstream-signature@2.0.8
|
|
28
|
-
- @graphql-mesh/plugin-prometheus@2.1.10-rc-
|
|
39
|
+
- @graphql-mesh/plugin-prometheus@2.1.10-rc-804105972c99ff73702f9a1261d6df0707de5e4a
|
|
29
40
|
|
|
30
41
|
## 2.1.23
|
|
31
42
|
### Patch Changes
|
package/dist/bin.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
require('dotenv/config');
|
|
4
4
|
var module$1 = require('node:module');
|
|
5
5
|
var logger = require('@graphql-hive/logger');
|
|
6
|
-
var cli = require('./cli-
|
|
6
|
+
var cli = require('./cli-DhpSD4Os.cjs');
|
|
7
7
|
require('node:cluster');
|
|
8
8
|
require('node:os');
|
|
9
9
|
require('node:path');
|
|
@@ -17,6 +17,7 @@ require('node:url');
|
|
|
17
17
|
require('node:fs');
|
|
18
18
|
require('node:http');
|
|
19
19
|
require('node:https');
|
|
20
|
+
require('@whatwg-node/server');
|
|
20
21
|
require('@opentelemetry/sdk-trace-base');
|
|
21
22
|
require('@graphql-tools/utils');
|
|
22
23
|
require('@graphql-tools/code-file-loader');
|
|
@@ -28,7 +29,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
28
29
|
|
|
29
30
|
var module__default = /*#__PURE__*/_interopDefault(module$1);
|
|
30
31
|
|
|
31
|
-
globalThis.__VERSION__ = '2.2.0-rc-
|
|
32
|
+
globalThis.__VERSION__ = '2.2.0-rc-804105972c99ff73702f9a1261d6df0707de5e4a';
|
|
32
33
|
module__default.default.register("@graphql-hive/importer/hooks", {
|
|
33
34
|
parentURL: (
|
|
34
35
|
// @ts-ignore bob will complain when bundling for cjs
|
package/dist/bin.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import 'dotenv/config';
|
|
3
3
|
import module$1 from 'node:module';
|
|
4
4
|
import { Logger } from '@graphql-hive/logger';
|
|
5
|
-
import { e as enableModuleCachingIfPossible, h as handleNodeWarnings, r as run } from './cli-
|
|
5
|
+
import { e as enableModuleCachingIfPossible, h as handleNodeWarnings, r as run } from './cli-Q4Ki2Qs_.js';
|
|
6
6
|
import 'node:cluster';
|
|
7
7
|
import 'node:os';
|
|
8
8
|
import 'node:path';
|
|
@@ -16,13 +16,14 @@ import 'node:url';
|
|
|
16
16
|
import 'node:fs';
|
|
17
17
|
import 'node:http';
|
|
18
18
|
import 'node:https';
|
|
19
|
+
import '@whatwg-node/server';
|
|
19
20
|
import '@opentelemetry/sdk-trace-base';
|
|
20
21
|
import '@graphql-tools/utils';
|
|
21
22
|
import '@graphql-tools/code-file-loader';
|
|
22
23
|
import '@graphql-tools/graphql-file-loader';
|
|
23
24
|
import '@graphql-tools/load';
|
|
24
25
|
|
|
25
|
-
globalThis.__VERSION__ = '2.2.0-rc-
|
|
26
|
+
globalThis.__VERSION__ = '2.2.0-rc-804105972c99ff73702f9a1261d6df0707de5e4a';
|
|
26
27
|
module$1.register("@graphql-hive/importer/hooks", {
|
|
27
28
|
parentURL: (
|
|
28
29
|
// @ts-ignore bob will complain when bundling for cjs
|
|
@@ -15,6 +15,7 @@ var node_url = require('node:url');
|
|
|
15
15
|
var node_fs = require('node:fs');
|
|
16
16
|
var node_http = require('node:http');
|
|
17
17
|
var node_https = require('node:https');
|
|
18
|
+
var server = require('@whatwg-node/server');
|
|
18
19
|
var sdkTraceBase = require('@opentelemetry/sdk-trace-base');
|
|
19
20
|
var utils$1 = require('@graphql-tools/utils');
|
|
20
21
|
var codeFileLoader = require('@graphql-tools/code-file-loader');
|
|
@@ -318,7 +319,7 @@ async function startBunServer(gwRuntime, opts) {
|
|
|
318
319
|
serverOptions.websocket = makeHandler(
|
|
319
320
|
gatewayRuntime.getGraphQLWSOptions(gwRuntime, (ctx) => ({
|
|
320
321
|
socket: ctx.extra.socket,
|
|
321
|
-
...ctx.extra.socket.data
|
|
322
|
+
...ctx.extra.socket.data
|
|
322
323
|
}))
|
|
323
324
|
);
|
|
324
325
|
serverOptions.fetch = function(request, server2) {
|
|
@@ -347,7 +348,7 @@ async function startNodeHttpServer(gwRuntime, opts) {
|
|
|
347
348
|
disableWebsockets,
|
|
348
349
|
requestTimeout
|
|
349
350
|
} = opts;
|
|
350
|
-
let server;
|
|
351
|
+
let server$1;
|
|
351
352
|
let protocol;
|
|
352
353
|
if (sslCredentials) {
|
|
353
354
|
protocol = "https";
|
|
@@ -381,7 +382,7 @@ async function startNodeHttpServer(gwRuntime, opts) {
|
|
|
381
382
|
if (sslCredentials.ssl_prefer_low_memory_usage) {
|
|
382
383
|
sslOptionsForNodeHttp.honorCipherOrder = true;
|
|
383
384
|
}
|
|
384
|
-
server = node_https.createServer(
|
|
385
|
+
server$1 = node_https.createServer(
|
|
385
386
|
{
|
|
386
387
|
...sslOptionsForNodeHttp,
|
|
387
388
|
maxHeaderSize,
|
|
@@ -391,7 +392,7 @@ async function startNodeHttpServer(gwRuntime, opts) {
|
|
|
391
392
|
);
|
|
392
393
|
} else {
|
|
393
394
|
protocol = "http";
|
|
394
|
-
server = node_http.createServer(
|
|
395
|
+
server$1 = node_http.createServer(
|
|
395
396
|
{
|
|
396
397
|
maxHeaderSize,
|
|
397
398
|
requestTimeout
|
|
@@ -406,13 +407,14 @@ async function startNodeHttpServer(gwRuntime, opts) {
|
|
|
406
407
|
const { WebSocketServer } = await import('ws');
|
|
407
408
|
const wsServer = new WebSocketServer({
|
|
408
409
|
path: gwRuntime.graphqlEndpoint,
|
|
409
|
-
server
|
|
410
|
+
server: server$1
|
|
410
411
|
});
|
|
411
412
|
const { useServer } = await import('graphql-ws/use/ws');
|
|
412
413
|
useServer(
|
|
413
414
|
gatewayRuntime.getGraphQLWSOptions(gwRuntime, (ctx) => ({
|
|
414
|
-
req: ctx.extra
|
|
415
|
-
socket: ctx.extra
|
|
415
|
+
req: ctx.extra.request,
|
|
416
|
+
socket: ctx.extra.socket,
|
|
417
|
+
request: server.normalizeNodeRequest(ctx.extra.request, gwRuntime.fetchAPI)
|
|
416
418
|
})),
|
|
417
419
|
wsServer
|
|
418
420
|
);
|
|
@@ -430,15 +432,15 @@ async function startNodeHttpServer(gwRuntime, opts) {
|
|
|
430
432
|
);
|
|
431
433
|
}
|
|
432
434
|
return new Promise((resolve, reject) => {
|
|
433
|
-
server.once("error", reject);
|
|
434
|
-
server.listen(port, host, () => {
|
|
435
|
+
server$1.once("error", reject);
|
|
436
|
+
server$1.listen(port, host, () => {
|
|
435
437
|
log.info(`Listening on ${url}`);
|
|
436
438
|
gwRuntime.disposableStack.defer(
|
|
437
439
|
() => new Promise((resolve2) => {
|
|
438
440
|
process.stderr.write("\n");
|
|
439
441
|
log.info("Stopping the server");
|
|
440
|
-
server.closeAllConnections();
|
|
441
|
-
server.close(() => {
|
|
442
|
+
server$1.closeAllConnections();
|
|
443
|
+
server$1.close(() => {
|
|
442
444
|
log.info("Stopped the server successfully");
|
|
443
445
|
return resolve2();
|
|
444
446
|
});
|
|
@@ -13,6 +13,7 @@ import { pathToFileURL } from 'node:url';
|
|
|
13
13
|
import { promises } from 'node:fs';
|
|
14
14
|
import { createServer as createServer$1 } from 'node:http';
|
|
15
15
|
import { createServer } from 'node:https';
|
|
16
|
+
import { normalizeNodeRequest } from '@whatwg-node/server';
|
|
16
17
|
import { BatchSpanProcessor } from '@opentelemetry/sdk-trace-base';
|
|
17
18
|
import { isValidPath, asArray } from '@graphql-tools/utils';
|
|
18
19
|
import { CodeFileLoader } from '@graphql-tools/code-file-loader';
|
|
@@ -311,7 +312,7 @@ async function startBunServer(gwRuntime, opts) {
|
|
|
311
312
|
serverOptions.websocket = makeHandler(
|
|
312
313
|
getGraphQLWSOptions(gwRuntime, (ctx) => ({
|
|
313
314
|
socket: ctx.extra.socket,
|
|
314
|
-
...ctx.extra.socket.data
|
|
315
|
+
...ctx.extra.socket.data
|
|
315
316
|
}))
|
|
316
317
|
);
|
|
317
318
|
serverOptions.fetch = function(request, server2) {
|
|
@@ -404,8 +405,9 @@ async function startNodeHttpServer(gwRuntime, opts) {
|
|
|
404
405
|
const { useServer } = await import('graphql-ws/use/ws');
|
|
405
406
|
useServer(
|
|
406
407
|
getGraphQLWSOptions(gwRuntime, (ctx) => ({
|
|
407
|
-
req: ctx.extra
|
|
408
|
-
socket: ctx.extra
|
|
408
|
+
req: ctx.extra.request,
|
|
409
|
+
socket: ctx.extra.socket,
|
|
410
|
+
request: normalizeNodeRequest(ctx.extra.request, gwRuntime.fetchAPI)
|
|
409
411
|
})),
|
|
410
412
|
wsServer
|
|
411
413
|
);
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var cli = require('./cli-
|
|
3
|
+
var cli = require('./cli-DhpSD4Os.cjs');
|
|
4
4
|
var logger = require('@graphql-hive/logger');
|
|
5
5
|
var gatewayRuntime = require('@graphql-hive/gateway-runtime');
|
|
6
6
|
var pubsub = require('@graphql-hive/pubsub');
|
|
@@ -30,6 +30,7 @@ require('node:url');
|
|
|
30
30
|
require('node:fs');
|
|
31
31
|
require('node:http');
|
|
32
32
|
require('node:https');
|
|
33
|
+
require('@whatwg-node/server');
|
|
33
34
|
require('@opentelemetry/sdk-trace-base');
|
|
34
35
|
require('@graphql-tools/utils');
|
|
35
36
|
require('@graphql-tools/code-file-loader');
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { b as defaultOptions, d as defineConfig, e as enableModuleCachingIfPossible, a as getBuiltinPluginsFromConfig, g as getCacheInstanceFromConfig, h as handleNodeWarnings, r as run } from './cli-
|
|
1
|
+
export { b as defaultOptions, d as defineConfig, e as enableModuleCachingIfPossible, a as getBuiltinPluginsFromConfig, g as getCacheInstanceFromConfig, h as handleNodeWarnings, r as run } from './cli-Q4Ki2Qs_.js';
|
|
2
2
|
export * from '@graphql-hive/logger';
|
|
3
3
|
export * from '@graphql-hive/gateway-runtime';
|
|
4
4
|
export * from '@graphql-hive/pubsub';
|
|
@@ -29,6 +29,7 @@ import 'node:url';
|
|
|
29
29
|
import 'node:fs';
|
|
30
30
|
import 'node:http';
|
|
31
31
|
import 'node:https';
|
|
32
|
+
import '@whatwg-node/server';
|
|
32
33
|
import '@opentelemetry/sdk-trace-base';
|
|
33
34
|
import '@graphql-tools/utils';
|
|
34
35
|
import '@graphql-tools/code-file-loader';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-hive/gateway",
|
|
3
|
-
"version": "2.2.0-rc-
|
|
3
|
+
"version": "2.2.0-rc-804105972c99ff73702f9a1261d6df0707de5e4a",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -94,11 +94,11 @@
|
|
|
94
94
|
"@escape.tech/graphql-armor-block-field-suggestions": "^3.0.0",
|
|
95
95
|
"@escape.tech/graphql-armor-max-depth": "^2.4.2",
|
|
96
96
|
"@escape.tech/graphql-armor-max-tokens": "^2.5.0",
|
|
97
|
-
"@graphql-hive/gateway-runtime": "2.5.0-rc-
|
|
97
|
+
"@graphql-hive/gateway-runtime": "2.5.0-rc-804105972c99ff73702f9a1261d6df0707de5e4a",
|
|
98
98
|
"@graphql-hive/importer": "^2.0.0",
|
|
99
99
|
"@graphql-hive/logger": "^1.0.9",
|
|
100
100
|
"@graphql-hive/plugin-aws-sigv4": "^2.0.20",
|
|
101
|
-
"@graphql-hive/plugin-opentelemetry": "1.3.0-rc-
|
|
101
|
+
"@graphql-hive/plugin-opentelemetry": "1.3.0-rc-804105972c99ff73702f9a1261d6df0707de5e4a",
|
|
102
102
|
"@graphql-hive/pubsub": "^2.1.1",
|
|
103
103
|
"@graphql-mesh/cache-cfw-kv": "^0.105.16",
|
|
104
104
|
"@graphql-mesh/cache-localforage": "^0.105.17",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"@graphql-mesh/plugin-http-cache": "^0.105.17",
|
|
110
110
|
"@graphql-mesh/plugin-jit": "^0.2.16",
|
|
111
111
|
"@graphql-mesh/plugin-jwt-auth": "^2.0.9",
|
|
112
|
-
"@graphql-mesh/plugin-prometheus": "2.1.10-rc-
|
|
112
|
+
"@graphql-mesh/plugin-prometheus": "2.1.10-rc-804105972c99ff73702f9a1261d6df0707de5e4a",
|
|
113
113
|
"@graphql-mesh/plugin-rate-limit": "^0.105.5",
|
|
114
114
|
"@graphql-mesh/plugin-snapshot": "^0.104.16",
|
|
115
115
|
"@graphql-mesh/transport-http": "^1.0.12",
|
|
@@ -135,6 +135,7 @@
|
|
|
135
135
|
"@opentelemetry/sdk-logs": "^0.208.0",
|
|
136
136
|
"@opentelemetry/sdk-metrics": "^2.2.0",
|
|
137
137
|
"@opentelemetry/sdk-trace-base": "^2.2.0",
|
|
138
|
+
"@whatwg-node/server": "^0.10.17",
|
|
138
139
|
"commander": "^14.0.2",
|
|
139
140
|
"dotenv": "^17.2.3",
|
|
140
141
|
"graphql-ws": "^6.0.6",
|