From d9c727fd694550283e0ce51df652116146712cde Mon Sep 17 00:00:00 2001 From: Valentin Cocaud Date: Mon, 10 Feb 2025 11:45:28 +0100 Subject: [PATCH] [otel] rely on context for parenting spans correctly --- e2e/auto-type-merging/package.json | 2 +- e2e/extra-fields/package.json | 2 +- e2e/hmac-auth-https/package.json | 2 +- .../package.json | 2 +- e2e/opentelemetry/package.json | 2 +- e2e/retry-timeout/package.json | 2 +- .../package.json | 2 +- e2e/type-merging-batching/package.json | 2 +- examples/apq-subgraphs/package-lock.json | 28 +- examples/extra-fields/package-lock.json | 30 +- examples/extra-fields/package.json | 2 +- examples/federation-example/package-lock.json | 28 +- examples/federation-mixed/package-lock.json | 28 +- .../package-lock.json | 28 +- examples/file-upload/package-lock.json | 28 +- examples/hmac-auth-https/package-lock.json | 30 +- examples/hmac-auth-https/package.json | 2 +- .../package-lock.json | 30 +- .../package.json | 2 +- .../package-lock.json | 28 +- .../package-lock.json | 28 +- examples/openapi-arg-rename/package-lock.json | 28 +- .../openapi-javascript-wiki/package-lock.json | 28 +- .../openapi-subscriptions/package-lock.json | 28 +- .../package-lock.json | 28 +- .../programmatic-batching/package-lock.json | 28 +- .../package-lock.json | 30 +- .../package.json | 2 +- .../type-merging-batching/package-lock.json | 30 +- examples/type-merging-batching/package.json | 2 +- package.json | 1 + packages/executors/http/package.json | 2 +- packages/fusion-runtime/package.json | 2 +- packages/gateway/package.json | 2 +- .../hmac-upstream-signature/package.json | 2 +- packages/plugins/opentelemetry/package.json | 2 +- .../opentelemetry/src/contextManager.ts | 2 +- .../plugins/opentelemetry/src/plugin-utils.ts | 104 +++++++ packages/plugins/opentelemetry/src/plugin.ts | 285 +++++++++--------- packages/plugins/opentelemetry/src/spans.ts | 69 +++-- packages/plugins/prometheus/package.json | 4 +- packages/runtime/package.json | 2 +- yarn.lock | 73 ++--- 43 files changed, 589 insertions(+), 473 deletions(-) create mode 100644 packages/plugins/opentelemetry/src/plugin-utils.ts diff --git a/e2e/auto-type-merging/package.json b/e2e/auto-type-merging/package.json index 02e9ff7ac..73a8c9870 100644 --- a/e2e/auto-type-merging/package.json +++ b/e2e/auto-type-merging/package.json @@ -5,7 +5,7 @@ "@graphql-mesh/compose-cli": "^1.2.13", "@omnigraph/openapi": "^0.108.6", "graphql": "^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" } } diff --git a/e2e/extra-fields/package.json b/e2e/extra-fields/package.json index 4f7c9f8e0..65877d100 100644 --- a/e2e/extra-fields/package.json +++ b/e2e/extra-fields/package.json @@ -4,7 +4,7 @@ "dependencies": { "@graphql-mesh/compose-cli": "^1.2.13", "graphql": "^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" } } diff --git a/e2e/hmac-auth-https/package.json b/e2e/hmac-auth-https/package.json index d7d10d384..6082e5ca5 100644 --- a/e2e/hmac-auth-https/package.json +++ b/e2e/hmac-auth-https/package.json @@ -13,6 +13,6 @@ "@graphql-mesh/hmac-upstream-signature": "workspace:^", "@graphql-mesh/plugin-jwt-auth": "^1.4.0", "graphql": "^16.10.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } } diff --git a/e2e/interface-additional-resolvers/package.json b/e2e/interface-additional-resolvers/package.json index e17c240ca..071a4a435 100644 --- a/e2e/interface-additional-resolvers/package.json +++ b/e2e/interface-additional-resolvers/package.json @@ -4,7 +4,7 @@ "dependencies": { "@graphql-mesh/compose-cli": "^1.2.13", "graphql": "^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" } } diff --git a/e2e/opentelemetry/package.json b/e2e/opentelemetry/package.json index 4f136d42d..992c46c70 100644 --- a/e2e/opentelemetry/package.json +++ b/e2e/opentelemetry/package.json @@ -6,7 +6,7 @@ "@apollo/subgraph": "^2.7.2", "@graphql-mesh/compose-cli": "^1.2.13", "graphql": "^16.8.1", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" } } diff --git a/e2e/retry-timeout/package.json b/e2e/retry-timeout/package.json index af74af202..a641512c2 100644 --- a/e2e/retry-timeout/package.json +++ b/e2e/retry-timeout/package.json @@ -5,7 +5,7 @@ "@apollo/subgraph": "^2.9.3", "@graphql-hive/gateway": "workspace:*", "graphql": "16.10.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" } } diff --git a/e2e/subscriptions-with-transforms/package.json b/e2e/subscriptions-with-transforms/package.json index cdcd07bdf..bfd74f8c0 100644 --- a/e2e/subscriptions-with-transforms/package.json +++ b/e2e/subscriptions-with-transforms/package.json @@ -5,7 +5,7 @@ "@graphql-mesh/compose-cli": "^1.2.13", "graphql": "16.10.0", "graphql-sse": "^2.5.3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" } } diff --git a/e2e/type-merging-batching/package.json b/e2e/type-merging-batching/package.json index f68f22b1d..861d43cc6 100644 --- a/e2e/type-merging-batching/package.json +++ b/e2e/type-merging-batching/package.json @@ -4,7 +4,7 @@ "dependencies": { "@graphql-mesh/compose-cli": "^1.2.13", "graphql": "^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" } } diff --git a/examples/apq-subgraphs/package-lock.json b/examples/apq-subgraphs/package-lock.json index 1b6f30e5b..1f5c01d1a 100644 --- a/examples/apq-subgraphs/package-lock.json +++ b/examples/apq-subgraphs/package-lock.json @@ -1307,7 +1307,7 @@ "commander": "^13.0.0", "dotenv": "^16.3.1", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "ws": "^8.18.0" }, @@ -1378,7 +1378,7 @@ "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/server": "^0.9.60", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1417,7 +1417,7 @@ }, "peerDependencies": { "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.8" } }, "node_modules/@graphql-inspector/core": { @@ -1648,7 +1648,7 @@ "@graphql-tools/wrap": "^10.0.29", "@whatwg-node/disposablestack": "^0.0.5", "constant-case": "^3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1884,7 +1884,7 @@ }, "peerDependencies": { "graphql": "^15.9.0 || ^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^13 || ^14.0.0 || ^15.0.0" } }, @@ -1924,7 +1924,7 @@ "@graphql-tools/utils": "^10.6.2", "@graphql-yoga/plugin-response-cache": "^3.1.1", "cache-control-parser": "^2.0.6", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.7.0", "tslib": "^2.4.0" }, "engines": { @@ -2697,7 +2697,7 @@ "@graphql-tools/utils": "^10.6.1", "@whatwg-node/fetch": "^0.10.1", "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-apollo-usage-report": { @@ -2715,7 +2715,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-csrf-prevention": { @@ -2727,7 +2727,7 @@ "node": ">=18.0.0" }, "peerDependencies": { - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-defer-stream": { @@ -2743,7 +2743,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-jwt": { @@ -2762,7 +2762,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.10" } }, "node_modules/@graphql-yoga/plugin-persisted-operations": { @@ -2775,7 +2775,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-prometheus": { @@ -2791,7 +2791,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^15.0.0" } }, @@ -2809,7 +2809,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/subscription": { diff --git a/examples/extra-fields/package-lock.json b/examples/extra-fields/package-lock.json index 72105cf22..fa5526bb3 100644 --- a/examples/extra-fields/package-lock.json +++ b/examples/extra-fields/package-lock.json @@ -9,7 +9,7 @@ "@graphql-hive/gateway": "^1.9.1", "@graphql-mesh/compose-cli": "^1.2.13", "graphql": "^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "devDependencies": { @@ -1094,7 +1094,7 @@ "commander": "^13.0.0", "dotenv": "^16.3.1", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "ws": "^8.18.0" }, @@ -1165,7 +1165,7 @@ "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/server": "^0.9.60", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1204,7 +1204,7 @@ }, "peerDependencies": { "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.8" } }, "node_modules/@graphql-inspector/core": { @@ -1399,7 +1399,7 @@ "@graphql-tools/wrap": "^10.0.29", "@whatwg-node/disposablestack": "^0.0.5", "constant-case": "^3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1617,7 +1617,7 @@ }, "peerDependencies": { "graphql": "^15.9.0 || ^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^13 || ^14.0.0 || ^15.0.0" } }, @@ -1657,7 +1657,7 @@ "@graphql-tools/utils": "^10.6.2", "@graphql-yoga/plugin-response-cache": "^3.1.1", "cache-control-parser": "^2.0.6", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.7.0", "tslib": "^2.4.0" }, "engines": { @@ -2299,7 +2299,7 @@ "@graphql-tools/utils": "^10.6.1", "@whatwg-node/fetch": "^0.10.1", "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-apollo-usage-report": { @@ -2317,7 +2317,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-csrf-prevention": { @@ -2329,7 +2329,7 @@ "node": ">=18.0.0" }, "peerDependencies": { - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-defer-stream": { @@ -2345,7 +2345,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-jwt": { @@ -2364,7 +2364,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.10" } }, "node_modules/@graphql-yoga/plugin-persisted-operations": { @@ -2377,7 +2377,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-prometheus": { @@ -2393,7 +2393,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^15.0.0" } }, @@ -2411,7 +2411,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/subscription": { diff --git a/examples/extra-fields/package.json b/examples/extra-fields/package.json index 8708ac145..3d36d794d 100644 --- a/examples/extra-fields/package.json +++ b/examples/extra-fields/package.json @@ -4,7 +4,7 @@ "dependencies": { "@graphql-mesh/compose-cli": "^1.2.13", "graphql": "^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "@graphql-hive/gateway": "^1.9.1" }, diff --git a/examples/federation-example/package-lock.json b/examples/federation-example/package-lock.json index 02d2b261c..4be520d99 100644 --- a/examples/federation-example/package-lock.json +++ b/examples/federation-example/package-lock.json @@ -1369,7 +1369,7 @@ "commander": "^13.0.0", "dotenv": "^16.3.1", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "ws": "^8.18.0" }, @@ -1440,7 +1440,7 @@ "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/server": "^0.9.60", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1479,7 +1479,7 @@ }, "peerDependencies": { "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.8" } }, "node_modules/@graphql-inspector/core": { @@ -1618,7 +1618,7 @@ "@graphql-tools/wrap": "^10.0.29", "@whatwg-node/disposablestack": "^0.0.5", "constant-case": "^3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1838,7 +1838,7 @@ }, "peerDependencies": { "graphql": "^15.9.0 || ^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^13 || ^14.0.0 || ^15.0.0" } }, @@ -1878,7 +1878,7 @@ "@graphql-tools/utils": "^10.6.2", "@graphql-yoga/plugin-response-cache": "^3.1.1", "cache-control-parser": "^2.0.6", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.7.0", "tslib": "^2.4.0" }, "engines": { @@ -2651,7 +2651,7 @@ "@graphql-tools/utils": "^10.6.1", "@whatwg-node/fetch": "^0.10.1", "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-apollo-usage-report": { @@ -2669,7 +2669,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-csrf-prevention": { @@ -2681,7 +2681,7 @@ "node": ">=18.0.0" }, "peerDependencies": { - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-defer-stream": { @@ -2697,7 +2697,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-jwt": { @@ -2716,7 +2716,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.10" } }, "node_modules/@graphql-yoga/plugin-persisted-operations": { @@ -2729,7 +2729,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-prometheus": { @@ -2745,7 +2745,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^15.0.0" } }, @@ -2763,7 +2763,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/subscription": { diff --git a/examples/federation-mixed/package-lock.json b/examples/federation-mixed/package-lock.json index ebcfeaab8..cece819f2 100644 --- a/examples/federation-mixed/package-lock.json +++ b/examples/federation-mixed/package-lock.json @@ -1373,7 +1373,7 @@ "commander": "^13.0.0", "dotenv": "^16.3.1", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "ws": "^8.18.0" }, @@ -1444,7 +1444,7 @@ "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/server": "^0.9.60", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1483,7 +1483,7 @@ }, "peerDependencies": { "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.8" } }, "node_modules/@graphql-inspector/core": { @@ -1714,7 +1714,7 @@ "@graphql-tools/wrap": "^10.0.29", "@whatwg-node/disposablestack": "^0.0.5", "constant-case": "^3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1950,7 +1950,7 @@ }, "peerDependencies": { "graphql": "^15.9.0 || ^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^13 || ^14.0.0 || ^15.0.0" } }, @@ -1990,7 +1990,7 @@ "@graphql-tools/utils": "^10.6.2", "@graphql-yoga/plugin-response-cache": "^3.1.1", "cache-control-parser": "^2.0.6", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.7.0", "tslib": "^2.4.0" }, "engines": { @@ -2790,7 +2790,7 @@ "@graphql-tools/utils": "^10.6.1", "@whatwg-node/fetch": "^0.10.1", "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-apollo-usage-report": { @@ -2808,7 +2808,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-csrf-prevention": { @@ -2820,7 +2820,7 @@ "node": ">=18.0.0" }, "peerDependencies": { - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-defer-stream": { @@ -2836,7 +2836,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-jwt": { @@ -2855,7 +2855,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.10" } }, "node_modules/@graphql-yoga/plugin-persisted-operations": { @@ -2868,7 +2868,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-prometheus": { @@ -2884,7 +2884,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^15.0.0" } }, @@ -2902,7 +2902,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/subscription": { diff --git a/examples/federation-subscriptions-passthrough/package-lock.json b/examples/federation-subscriptions-passthrough/package-lock.json index 7fe0581b3..febf6427a 100644 --- a/examples/federation-subscriptions-passthrough/package-lock.json +++ b/examples/federation-subscriptions-passthrough/package-lock.json @@ -1404,7 +1404,7 @@ "commander": "^13.0.0", "dotenv": "^16.3.1", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "ws": "^8.18.0" }, @@ -1475,7 +1475,7 @@ "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/server": "^0.9.60", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1514,7 +1514,7 @@ }, "peerDependencies": { "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.8" } }, "node_modules/@graphql-inspector/core": { @@ -1653,7 +1653,7 @@ "@graphql-tools/wrap": "^10.0.29", "@whatwg-node/disposablestack": "^0.0.5", "constant-case": "^3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1873,7 +1873,7 @@ }, "peerDependencies": { "graphql": "^15.9.0 || ^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^13 || ^14.0.0 || ^15.0.0" } }, @@ -1913,7 +1913,7 @@ "@graphql-tools/utils": "^10.6.2", "@graphql-yoga/plugin-response-cache": "^3.1.1", "cache-control-parser": "^2.0.6", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.7.0", "tslib": "^2.4.0" }, "engines": { @@ -2686,7 +2686,7 @@ "@graphql-tools/utils": "^10.6.1", "@whatwg-node/fetch": "^0.10.1", "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-apollo-usage-report": { @@ -2704,7 +2704,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-csrf-prevention": { @@ -2716,7 +2716,7 @@ "node": ">=18.0.0" }, "peerDependencies": { - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-defer-stream": { @@ -2732,7 +2732,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-jwt": { @@ -2751,7 +2751,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.10" } }, "node_modules/@graphql-yoga/plugin-persisted-operations": { @@ -2764,7 +2764,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-prometheus": { @@ -2780,7 +2780,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^15.0.0" } }, @@ -2798,7 +2798,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/subscription": { diff --git a/examples/file-upload/package-lock.json b/examples/file-upload/package-lock.json index 4d67d4a74..5fbcf879c 100644 --- a/examples/file-upload/package-lock.json +++ b/examples/file-upload/package-lock.json @@ -1093,7 +1093,7 @@ "commander": "^13.0.0", "dotenv": "^16.3.1", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "ws": "^8.18.0" }, @@ -1164,7 +1164,7 @@ "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/server": "^0.9.60", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1203,7 +1203,7 @@ }, "peerDependencies": { "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.8" } }, "node_modules/@graphql-inspector/core": { @@ -1398,7 +1398,7 @@ "@graphql-tools/wrap": "^10.0.29", "@whatwg-node/disposablestack": "^0.0.5", "constant-case": "^3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1616,7 +1616,7 @@ }, "peerDependencies": { "graphql": "^15.9.0 || ^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^13 || ^14.0.0 || ^15.0.0" } }, @@ -1656,7 +1656,7 @@ "@graphql-tools/utils": "^10.6.2", "@graphql-yoga/plugin-response-cache": "^3.1.1", "cache-control-parser": "^2.0.6", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.7.0", "tslib": "^2.4.0" }, "engines": { @@ -2298,7 +2298,7 @@ "@graphql-tools/utils": "^10.6.1", "@whatwg-node/fetch": "^0.10.1", "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-apollo-usage-report": { @@ -2316,7 +2316,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-csrf-prevention": { @@ -2328,7 +2328,7 @@ "node": ">=18.0.0" }, "peerDependencies": { - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-defer-stream": { @@ -2344,7 +2344,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-jwt": { @@ -2363,7 +2363,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.10" } }, "node_modules/@graphql-yoga/plugin-persisted-operations": { @@ -2376,7 +2376,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-prometheus": { @@ -2392,7 +2392,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^15.0.0" } }, @@ -2410,7 +2410,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/subscription": { diff --git a/examples/hmac-auth-https/package-lock.json b/examples/hmac-auth-https/package-lock.json index 3bfe3f397..4ed4dc1d7 100644 --- a/examples/hmac-auth-https/package-lock.json +++ b/examples/hmac-auth-https/package-lock.json @@ -15,7 +15,7 @@ "@graphql-mesh/hmac-upstream-signature": "^1.2.19", "@graphql-mesh/plugin-jwt-auth": "^1.4.0", "graphql": "^16.10.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" }, "devDependencies": { "tsx": "^4.19.2" @@ -1346,7 +1346,7 @@ "commander": "^13.0.0", "dotenv": "^16.3.1", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "ws": "^8.18.0" }, @@ -1417,7 +1417,7 @@ "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/server": "^0.9.60", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1456,7 +1456,7 @@ }, "peerDependencies": { "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.8" } }, "node_modules/@graphql-inspector/core": { @@ -1687,7 +1687,7 @@ "@graphql-tools/wrap": "^10.0.29", "@whatwg-node/disposablestack": "^0.0.5", "constant-case": "^3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1923,7 +1923,7 @@ }, "peerDependencies": { "graphql": "^15.9.0 || ^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^13 || ^14.0.0 || ^15.0.0" } }, @@ -1963,7 +1963,7 @@ "@graphql-tools/utils": "^10.6.2", "@graphql-yoga/plugin-response-cache": "^3.1.1", "cache-control-parser": "^2.0.6", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.7.0", "tslib": "^2.4.0" }, "engines": { @@ -2736,7 +2736,7 @@ "@graphql-tools/utils": "^10.6.1", "@whatwg-node/fetch": "^0.10.1", "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-apollo-usage-report": { @@ -2754,7 +2754,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-csrf-prevention": { @@ -2766,7 +2766,7 @@ "node": ">=18.0.0" }, "peerDependencies": { - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-defer-stream": { @@ -2782,7 +2782,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-jwt": { @@ -2801,7 +2801,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.10" } }, "node_modules/@graphql-yoga/plugin-persisted-operations": { @@ -2814,7 +2814,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-prometheus": { @@ -2830,7 +2830,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^15.0.0" } }, @@ -2848,7 +2848,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/subscription": { diff --git a/examples/hmac-auth-https/package.json b/examples/hmac-auth-https/package.json index ca7f8f7e5..c81d3aa6f 100644 --- a/examples/hmac-auth-https/package.json +++ b/examples/hmac-auth-https/package.json @@ -17,7 +17,7 @@ "@graphql-mesh/hmac-upstream-signature": "^1.2.19", "@graphql-mesh/plugin-jwt-auth": "^1.4.0", "graphql": "^16.10.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" }, "devDependencies": { "tsx": "^4.19.2" diff --git a/examples/interface-additional-resolvers/package-lock.json b/examples/interface-additional-resolvers/package-lock.json index ba41dee8c..68f16158f 100644 --- a/examples/interface-additional-resolvers/package-lock.json +++ b/examples/interface-additional-resolvers/package-lock.json @@ -9,7 +9,7 @@ "@graphql-hive/gateway": "^1.9.1", "@graphql-mesh/compose-cli": "^1.2.13", "graphql": "^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "devDependencies": { @@ -1094,7 +1094,7 @@ "commander": "^13.0.0", "dotenv": "^16.3.1", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "ws": "^8.18.0" }, @@ -1165,7 +1165,7 @@ "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/server": "^0.9.60", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1204,7 +1204,7 @@ }, "peerDependencies": { "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.8" } }, "node_modules/@graphql-inspector/core": { @@ -1399,7 +1399,7 @@ "@graphql-tools/wrap": "^10.0.29", "@whatwg-node/disposablestack": "^0.0.5", "constant-case": "^3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1617,7 +1617,7 @@ }, "peerDependencies": { "graphql": "^15.9.0 || ^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^13 || ^14.0.0 || ^15.0.0" } }, @@ -1657,7 +1657,7 @@ "@graphql-tools/utils": "^10.6.2", "@graphql-yoga/plugin-response-cache": "^3.1.1", "cache-control-parser": "^2.0.6", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.7.0", "tslib": "^2.4.0" }, "engines": { @@ -2299,7 +2299,7 @@ "@graphql-tools/utils": "^10.6.1", "@whatwg-node/fetch": "^0.10.1", "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-apollo-usage-report": { @@ -2317,7 +2317,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-csrf-prevention": { @@ -2329,7 +2329,7 @@ "node": ">=18.0.0" }, "peerDependencies": { - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-defer-stream": { @@ -2345,7 +2345,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-jwt": { @@ -2364,7 +2364,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.10" } }, "node_modules/@graphql-yoga/plugin-persisted-operations": { @@ -2377,7 +2377,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-prometheus": { @@ -2393,7 +2393,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^15.0.0" } }, @@ -2411,7 +2411,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/subscription": { diff --git a/examples/interface-additional-resolvers/package.json b/examples/interface-additional-resolvers/package.json index 5697134d4..7b94ca3eb 100644 --- a/examples/interface-additional-resolvers/package.json +++ b/examples/interface-additional-resolvers/package.json @@ -4,7 +4,7 @@ "dependencies": { "@graphql-mesh/compose-cli": "^1.2.13", "graphql": "^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "@graphql-hive/gateway": "^1.9.1" }, diff --git a/examples/json-schema-subscriptions/package-lock.json b/examples/json-schema-subscriptions/package-lock.json index 8c5934db6..4657568a1 100644 --- a/examples/json-schema-subscriptions/package-lock.json +++ b/examples/json-schema-subscriptions/package-lock.json @@ -1118,7 +1118,7 @@ "commander": "^13.0.0", "dotenv": "^16.3.1", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "ws": "^8.18.0" }, @@ -1189,7 +1189,7 @@ "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/server": "^0.9.60", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1228,7 +1228,7 @@ }, "peerDependencies": { "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.8" } }, "node_modules/@graphql-inspector/core": { @@ -1423,7 +1423,7 @@ "@graphql-tools/wrap": "^10.0.29", "@whatwg-node/disposablestack": "^0.0.5", "constant-case": "^3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1663,7 +1663,7 @@ }, "peerDependencies": { "graphql": "^15.9.0 || ^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^13 || ^14.0.0 || ^15.0.0" } }, @@ -1703,7 +1703,7 @@ "@graphql-tools/utils": "^10.6.2", "@graphql-yoga/plugin-response-cache": "^3.1.1", "cache-control-parser": "^2.0.6", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.7.0", "tslib": "^2.4.0" }, "engines": { @@ -2372,7 +2372,7 @@ "@graphql-tools/utils": "^10.6.1", "@whatwg-node/fetch": "^0.10.1", "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-apollo-usage-report": { @@ -2390,7 +2390,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-csrf-prevention": { @@ -2402,7 +2402,7 @@ "node": ">=18.0.0" }, "peerDependencies": { - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-defer-stream": { @@ -2418,7 +2418,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-jwt": { @@ -2437,7 +2437,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.10" } }, "node_modules/@graphql-yoga/plugin-persisted-operations": { @@ -2450,7 +2450,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-prometheus": { @@ -2466,7 +2466,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^15.0.0" } }, @@ -2484,7 +2484,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/subscription": { diff --git a/examples/openapi-additional-resolvers/package-lock.json b/examples/openapi-additional-resolvers/package-lock.json index 593bc9af1..63e1b5bbc 100644 --- a/examples/openapi-additional-resolvers/package-lock.json +++ b/examples/openapi-additional-resolvers/package-lock.json @@ -684,7 +684,7 @@ "commander": "^13.0.0", "dotenv": "^16.3.1", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "ws": "^8.18.0" }, @@ -755,7 +755,7 @@ "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/server": "^0.9.60", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -794,7 +794,7 @@ }, "peerDependencies": { "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.8" } }, "node_modules/@graphql-inspector/core": { @@ -989,7 +989,7 @@ "@graphql-tools/wrap": "^10.0.29", "@whatwg-node/disposablestack": "^0.0.5", "constant-case": "^3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1207,7 +1207,7 @@ }, "peerDependencies": { "graphql": "^15.9.0 || ^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^13 || ^14.0.0 || ^15.0.0" } }, @@ -1247,7 +1247,7 @@ "@graphql-tools/utils": "^10.6.2", "@graphql-yoga/plugin-response-cache": "^3.1.1", "cache-control-parser": "^2.0.6", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.7.0", "tslib": "^2.4.0" }, "engines": { @@ -1916,7 +1916,7 @@ "@graphql-tools/utils": "^10.6.1", "@whatwg-node/fetch": "^0.10.1", "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-apollo-usage-report": { @@ -1934,7 +1934,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-csrf-prevention": { @@ -1946,7 +1946,7 @@ "node": ">=18.0.0" }, "peerDependencies": { - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-defer-stream": { @@ -1962,7 +1962,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-jwt": { @@ -1981,7 +1981,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.10" } }, "node_modules/@graphql-yoga/plugin-persisted-operations": { @@ -1994,7 +1994,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-prometheus": { @@ -2010,7 +2010,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^15.0.0" } }, @@ -2028,7 +2028,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/subscription": { diff --git a/examples/openapi-arg-rename/package-lock.json b/examples/openapi-arg-rename/package-lock.json index d8d036930..c671c502a 100644 --- a/examples/openapi-arg-rename/package-lock.json +++ b/examples/openapi-arg-rename/package-lock.json @@ -1095,7 +1095,7 @@ "commander": "^13.0.0", "dotenv": "^16.3.1", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "ws": "^8.18.0" }, @@ -1166,7 +1166,7 @@ "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/server": "^0.9.60", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1205,7 +1205,7 @@ }, "peerDependencies": { "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.8" } }, "node_modules/@graphql-inspector/core": { @@ -1400,7 +1400,7 @@ "@graphql-tools/wrap": "^10.0.29", "@whatwg-node/disposablestack": "^0.0.5", "constant-case": "^3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1618,7 +1618,7 @@ }, "peerDependencies": { "graphql": "^15.9.0 || ^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^13 || ^14.0.0 || ^15.0.0" } }, @@ -1658,7 +1658,7 @@ "@graphql-tools/utils": "^10.6.2", "@graphql-yoga/plugin-response-cache": "^3.1.1", "cache-control-parser": "^2.0.6", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.7.0", "tslib": "^2.4.0" }, "engines": { @@ -2327,7 +2327,7 @@ "@graphql-tools/utils": "^10.6.1", "@whatwg-node/fetch": "^0.10.1", "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-apollo-usage-report": { @@ -2345,7 +2345,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-csrf-prevention": { @@ -2357,7 +2357,7 @@ "node": ">=18.0.0" }, "peerDependencies": { - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-defer-stream": { @@ -2373,7 +2373,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-jwt": { @@ -2392,7 +2392,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.10" } }, "node_modules/@graphql-yoga/plugin-persisted-operations": { @@ -2405,7 +2405,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-prometheus": { @@ -2421,7 +2421,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^15.0.0" } }, @@ -2439,7 +2439,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/subscription": { diff --git a/examples/openapi-javascript-wiki/package-lock.json b/examples/openapi-javascript-wiki/package-lock.json index d5c4c383d..8ccea3f59 100644 --- a/examples/openapi-javascript-wiki/package-lock.json +++ b/examples/openapi-javascript-wiki/package-lock.json @@ -684,7 +684,7 @@ "commander": "^13.0.0", "dotenv": "^16.3.1", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "ws": "^8.18.0" }, @@ -755,7 +755,7 @@ "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/server": "^0.9.60", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -794,7 +794,7 @@ }, "peerDependencies": { "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.8" } }, "node_modules/@graphql-inspector/core": { @@ -989,7 +989,7 @@ "@graphql-tools/wrap": "^10.0.29", "@whatwg-node/disposablestack": "^0.0.5", "constant-case": "^3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1207,7 +1207,7 @@ }, "peerDependencies": { "graphql": "^15.9.0 || ^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^13 || ^14.0.0 || ^15.0.0" } }, @@ -1247,7 +1247,7 @@ "@graphql-tools/utils": "^10.6.2", "@graphql-yoga/plugin-response-cache": "^3.1.1", "cache-control-parser": "^2.0.6", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.7.0", "tslib": "^2.4.0" }, "engines": { @@ -1916,7 +1916,7 @@ "@graphql-tools/utils": "^10.6.1", "@whatwg-node/fetch": "^0.10.1", "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-apollo-usage-report": { @@ -1934,7 +1934,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-csrf-prevention": { @@ -1946,7 +1946,7 @@ "node": ">=18.0.0" }, "peerDependencies": { - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-defer-stream": { @@ -1962,7 +1962,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-jwt": { @@ -1981,7 +1981,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.10" } }, "node_modules/@graphql-yoga/plugin-persisted-operations": { @@ -1994,7 +1994,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-prometheus": { @@ -2010,7 +2010,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^15.0.0" } }, @@ -2028,7 +2028,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/subscription": { diff --git a/examples/openapi-subscriptions/package-lock.json b/examples/openapi-subscriptions/package-lock.json index e06cc9abe..10bdf8abb 100644 --- a/examples/openapi-subscriptions/package-lock.json +++ b/examples/openapi-subscriptions/package-lock.json @@ -1097,7 +1097,7 @@ "commander": "^13.0.0", "dotenv": "^16.3.1", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "ws": "^8.18.0" }, @@ -1168,7 +1168,7 @@ "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/server": "^0.9.60", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1207,7 +1207,7 @@ }, "peerDependencies": { "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.8" } }, "node_modules/@graphql-inspector/core": { @@ -1402,7 +1402,7 @@ "@graphql-tools/wrap": "^10.0.29", "@whatwg-node/disposablestack": "^0.0.5", "constant-case": "^3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1620,7 +1620,7 @@ }, "peerDependencies": { "graphql": "^15.9.0 || ^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^13 || ^14.0.0 || ^15.0.0" } }, @@ -1660,7 +1660,7 @@ "@graphql-tools/utils": "^10.6.2", "@graphql-yoga/plugin-response-cache": "^3.1.1", "cache-control-parser": "^2.0.6", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.7.0", "tslib": "^2.4.0" }, "engines": { @@ -2335,7 +2335,7 @@ "@graphql-tools/utils": "^10.6.1", "@whatwg-node/fetch": "^0.10.1", "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-apollo-usage-report": { @@ -2353,7 +2353,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-csrf-prevention": { @@ -2365,7 +2365,7 @@ "node": ">=18.0.0" }, "peerDependencies": { - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-defer-stream": { @@ -2381,7 +2381,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-jwt": { @@ -2400,7 +2400,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.10" } }, "node_modules/@graphql-yoga/plugin-persisted-operations": { @@ -2413,7 +2413,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-prometheus": { @@ -2429,7 +2429,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^15.0.0" } }, @@ -2447,7 +2447,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/subscription": { diff --git a/examples/operation-field-permissions/package-lock.json b/examples/operation-field-permissions/package-lock.json index 2b7cce1a8..dd5e6e9cb 100644 --- a/examples/operation-field-permissions/package-lock.json +++ b/examples/operation-field-permissions/package-lock.json @@ -1111,7 +1111,7 @@ "commander": "^13.0.0", "dotenv": "^16.3.1", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "ws": "^8.18.0" }, @@ -1182,7 +1182,7 @@ "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/server": "^0.9.60", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1221,7 +1221,7 @@ }, "peerDependencies": { "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.8" } }, "node_modules/@graphql-inspector/core": { @@ -1416,7 +1416,7 @@ "@graphql-tools/wrap": "^10.0.29", "@whatwg-node/disposablestack": "^0.0.5", "constant-case": "^3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1634,7 +1634,7 @@ }, "peerDependencies": { "graphql": "^15.9.0 || ^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^13 || ^14.0.0 || ^15.0.0" } }, @@ -1674,7 +1674,7 @@ "@graphql-tools/utils": "^10.6.2", "@graphql-yoga/plugin-response-cache": "^3.1.1", "cache-control-parser": "^2.0.6", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.7.0", "tslib": "^2.4.0" }, "engines": { @@ -2316,7 +2316,7 @@ "@graphql-tools/utils": "^10.6.1", "@whatwg-node/fetch": "^0.10.1", "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-apollo-usage-report": { @@ -2334,7 +2334,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-csrf-prevention": { @@ -2346,7 +2346,7 @@ "node": ">=18.0.0" }, "peerDependencies": { - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-defer-stream": { @@ -2362,7 +2362,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-jwt": { @@ -2381,7 +2381,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.10" } }, "node_modules/@graphql-yoga/plugin-persisted-operations": { @@ -2394,7 +2394,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-prometheus": { @@ -2410,7 +2410,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^15.0.0" } }, @@ -2428,7 +2428,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/subscription": { diff --git a/examples/programmatic-batching/package-lock.json b/examples/programmatic-batching/package-lock.json index b0bb48325..a7a823075 100644 --- a/examples/programmatic-batching/package-lock.json +++ b/examples/programmatic-batching/package-lock.json @@ -1095,7 +1095,7 @@ "commander": "^13.0.0", "dotenv": "^16.3.1", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "ws": "^8.18.0" }, @@ -1166,7 +1166,7 @@ "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/server": "^0.9.60", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1205,7 +1205,7 @@ }, "peerDependencies": { "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.8" } }, "node_modules/@graphql-inspector/core": { @@ -1400,7 +1400,7 @@ "@graphql-tools/wrap": "^10.0.29", "@whatwg-node/disposablestack": "^0.0.5", "constant-case": "^3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1618,7 +1618,7 @@ }, "peerDependencies": { "graphql": "^15.9.0 || ^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^13 || ^14.0.0 || ^15.0.0" } }, @@ -1658,7 +1658,7 @@ "@graphql-tools/utils": "^10.6.2", "@graphql-yoga/plugin-response-cache": "^3.1.1", "cache-control-parser": "^2.0.6", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.7.0", "tslib": "^2.4.0" }, "engines": { @@ -2327,7 +2327,7 @@ "@graphql-tools/utils": "^10.6.1", "@whatwg-node/fetch": "^0.10.1", "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-apollo-usage-report": { @@ -2345,7 +2345,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-csrf-prevention": { @@ -2357,7 +2357,7 @@ "node": ">=18.0.0" }, "peerDependencies": { - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-defer-stream": { @@ -2373,7 +2373,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-jwt": { @@ -2392,7 +2392,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.10" } }, "node_modules/@graphql-yoga/plugin-persisted-operations": { @@ -2405,7 +2405,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-prometheus": { @@ -2421,7 +2421,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^15.0.0" } }, @@ -2439,7 +2439,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/subscription": { diff --git a/examples/subscriptions-with-transforms/package-lock.json b/examples/subscriptions-with-transforms/package-lock.json index c64859e8b..cb45dc1f1 100644 --- a/examples/subscriptions-with-transforms/package-lock.json +++ b/examples/subscriptions-with-transforms/package-lock.json @@ -10,7 +10,7 @@ "@graphql-mesh/compose-cli": "^1.2.13", "graphql": "16.10.0", "graphql-sse": "^2.5.3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "devDependencies": { @@ -1095,7 +1095,7 @@ "commander": "^13.0.0", "dotenv": "^16.3.1", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "ws": "^8.18.0" }, @@ -1166,7 +1166,7 @@ "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/server": "^0.9.60", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1205,7 +1205,7 @@ }, "peerDependencies": { "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.8" } }, "node_modules/@graphql-inspector/core": { @@ -1400,7 +1400,7 @@ "@graphql-tools/wrap": "^10.0.29", "@whatwg-node/disposablestack": "^0.0.5", "constant-case": "^3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1618,7 +1618,7 @@ }, "peerDependencies": { "graphql": "^15.9.0 || ^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^13 || ^14.0.0 || ^15.0.0" } }, @@ -1658,7 +1658,7 @@ "@graphql-tools/utils": "^10.6.2", "@graphql-yoga/plugin-response-cache": "^3.1.1", "cache-control-parser": "^2.0.6", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.7.0", "tslib": "^2.4.0" }, "engines": { @@ -2300,7 +2300,7 @@ "@graphql-tools/utils": "^10.6.1", "@whatwg-node/fetch": "^0.10.1", "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-apollo-usage-report": { @@ -2318,7 +2318,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-csrf-prevention": { @@ -2330,7 +2330,7 @@ "node": ">=18.0.0" }, "peerDependencies": { - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-defer-stream": { @@ -2346,7 +2346,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-jwt": { @@ -2365,7 +2365,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.10" } }, "node_modules/@graphql-yoga/plugin-persisted-operations": { @@ -2378,7 +2378,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-prometheus": { @@ -2394,7 +2394,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^15.0.0" } }, @@ -2412,7 +2412,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/subscription": { diff --git a/examples/subscriptions-with-transforms/package.json b/examples/subscriptions-with-transforms/package.json index ca88da298..1c56a46c8 100644 --- a/examples/subscriptions-with-transforms/package.json +++ b/examples/subscriptions-with-transforms/package.json @@ -5,7 +5,7 @@ "@graphql-mesh/compose-cli": "^1.2.13", "graphql": "16.10.0", "graphql-sse": "^2.5.3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "@graphql-hive/gateway": "^1.9.1" }, diff --git a/examples/type-merging-batching/package-lock.json b/examples/type-merging-batching/package-lock.json index 8a1085202..d5f573cab 100644 --- a/examples/type-merging-batching/package-lock.json +++ b/examples/type-merging-batching/package-lock.json @@ -9,7 +9,7 @@ "@graphql-hive/gateway": "^1.9.1", "@graphql-mesh/compose-cli": "^1.2.13", "graphql": "^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "devDependencies": { @@ -1094,7 +1094,7 @@ "commander": "^13.0.0", "dotenv": "^16.3.1", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "ws": "^8.18.0" }, @@ -1165,7 +1165,7 @@ "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/server": "^0.9.60", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1204,7 +1204,7 @@ }, "peerDependencies": { "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.8" } }, "node_modules/@graphql-inspector/core": { @@ -1399,7 +1399,7 @@ "@graphql-tools/wrap": "^10.0.29", "@whatwg-node/disposablestack": "^0.0.5", "constant-case": "^3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "engines": { @@ -1617,7 +1617,7 @@ }, "peerDependencies": { "graphql": "^15.9.0 || ^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^13 || ^14.0.0 || ^15.0.0" } }, @@ -1657,7 +1657,7 @@ "@graphql-tools/utils": "^10.6.2", "@graphql-yoga/plugin-response-cache": "^3.1.1", "cache-control-parser": "^2.0.6", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.7.0", "tslib": "^2.4.0" }, "engines": { @@ -2299,7 +2299,7 @@ "@graphql-tools/utils": "^10.6.1", "@whatwg-node/fetch": "^0.10.1", "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-apollo-usage-report": { @@ -2317,7 +2317,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-csrf-prevention": { @@ -2329,7 +2329,7 @@ "node": ">=18.0.0" }, "peerDependencies": { - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-defer-stream": { @@ -2345,7 +2345,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-jwt": { @@ -2364,7 +2364,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.10" } }, "node_modules/@graphql-yoga/plugin-persisted-operations": { @@ -2377,7 +2377,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/plugin-prometheus": { @@ -2393,7 +2393,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^15.0.0" } }, @@ -2411,7 +2411,7 @@ }, "peerDependencies": { "graphql": "^15.2.0 || ^16.0.0", - "graphql-yoga": "^5.11.0" + "graphql-yoga": "^5.10.11" } }, "node_modules/@graphql-yoga/subscription": { diff --git a/examples/type-merging-batching/package.json b/examples/type-merging-batching/package.json index bbd4f9959..b9843c4f0 100644 --- a/examples/type-merging-batching/package.json +++ b/examples/type-merging-batching/package.json @@ -4,7 +4,7 @@ "dependencies": { "@graphql-mesh/compose-cli": "^1.2.13", "graphql": "^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "@graphql-hive/gateway": "^1.9.1" }, diff --git a/package.json b/package.json index c9c9364f5..e9fbc2c55 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "vitest": "^3.0.1" }, "resolutions": { + "@envelop/core": "5.1.0-alpha-20250206123608-cd323a08c43c066eb34cba698d61b4f059ab5ee5", "@graphql-tools/delegate": "workspace:^", "@opentelemetry/exporter-trace-otlp-http": "patch:@opentelemetry/exporter-trace-otlp-http@npm%3A0.56.0#~/.yarn/patches/@opentelemetry-exporter-trace-otlp-http-npm-0.56.0-dddd282e41.patch", "@opentelemetry/otlp-exporter-base": "patch:@opentelemetry/otlp-exporter-base@npm%3A0.56.0#~/.yarn/patches/@opentelemetry-otlp-exporter-base-npm-0.56.0-ba3dc5f5c5.patch", diff --git a/packages/executors/http/package.json b/packages/executors/http/package.json index 772ea9d2a..55f765bb4 100644 --- a/packages/executors/http/package.json +++ b/packages/executors/http/package.json @@ -55,7 +55,7 @@ "@types/extract-files": "8.1.3", "@whatwg-node/disposablestack": "^0.0.5", "graphql": "^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "pkgroll": "2.6.1" }, "sideEffects": false diff --git a/packages/fusion-runtime/package.json b/packages/fusion-runtime/package.json index 52b88b3a5..2d1ead821 100644 --- a/packages/fusion-runtime/package.json +++ b/packages/fusion-runtime/package.json @@ -58,7 +58,7 @@ "@graphql-tools/wrap": "workspace:^", "@whatwg-node/disposablestack": "^0.0.5", "constant-case": "^3", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "devDependencies": { diff --git a/packages/gateway/package.json b/packages/gateway/package.json index 6fe7fcab2..4d3661632 100644 --- a/packages/gateway/package.json +++ b/packages/gateway/package.json @@ -84,7 +84,7 @@ "commander": "^13.0.0", "dotenv": "^16.3.1", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1", "ws": "^8.18.0" }, diff --git a/packages/plugins/hmac-upstream-signature/package.json b/packages/plugins/hmac-upstream-signature/package.json index 621d37ccb..666852fb9 100644 --- a/packages/plugins/hmac-upstream-signature/package.json +++ b/packages/plugins/hmac-upstream-signature/package.json @@ -54,7 +54,7 @@ "@graphql-hive/gateway-runtime": "workspace:*", "@types/json-stable-stringify": "^1.1.0", "graphql": "^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "pkgroll": "2.6.1" }, "sideEffects": false diff --git a/packages/plugins/opentelemetry/package.json b/packages/plugins/opentelemetry/package.json index ad08d8242..bfd55bcd0 100644 --- a/packages/plugins/opentelemetry/package.json +++ b/packages/plugins/opentelemetry/package.json @@ -65,7 +65,7 @@ "devDependencies": { "@whatwg-node/server": "^0.9.65", "graphql": "^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "pkgroll": "2.6.1" }, "sideEffects": false diff --git a/packages/plugins/opentelemetry/src/contextManager.ts b/packages/plugins/opentelemetry/src/contextManager.ts index 003c4e361..f4bae5c2b 100644 --- a/packages/plugins/opentelemetry/src/contextManager.ts +++ b/packages/plugins/opentelemetry/src/contextManager.ts @@ -5,7 +5,7 @@ type Node = { previous?: Node; }; -export class OtelGraphqlContext { +export class OtelContextStack { #root: Node; #current: Node; diff --git a/packages/plugins/opentelemetry/src/plugin-utils.ts b/packages/plugins/opentelemetry/src/plugin-utils.ts new file mode 100644 index 000000000..8a7a0bd12 --- /dev/null +++ b/packages/plugins/opentelemetry/src/plugin-utils.ts @@ -0,0 +1,104 @@ +import type { ExecutionRequest } from '@graphql-tools/utils'; + +export function withState< + P, + GraphqlState = object, + HttpState = object, + SubExecState = object, +>(plugin: WithState): P { + const states: { + forRequest?: WeakMap>; + forOperation?: WeakMap>; + forSubgraphExecution?: WeakMap>; + } = {}; + + function getProp(scope: keyof typeof states, key: any): PropertyDescriptor { + return { + get() { + if (!states[scope]) states[scope] = new WeakMap(); + let value = states[scope].get(key as any); + if (!value) states[scope].set(key, (value = {})); + return value; + }, + enumerable: true, + }; + } + + const pluginWithState: Record unknown> = {}; + for (const [hookName, hook] of Object.entries(plugin) as any) { + pluginWithState[hookName] = (payload) => + hook({ + ...payload, + get state() { + let { executionRequest, context, request } = payload; + + const state = {}; + const defineState = (scope: keyof typeof states, key: any) => + Object.defineProperty(state, scope, getProp(scope, key)); + + if (executionRequest) { + defineState('forSubgraphExecution', executionRequest); + if (executionRequest.context) context = executionRequest.context; + } + if (context) { + defineState('forOperation', context); + if (context.request) request = context.request; + } + if (request) { + defineState('forRequest', request); + } + return state; + }, + }); + } + + return pluginWithState as P; +} + +export type HttpState = { + forRequest: Partial; +}; + +export type GraphQLState = { + forOperation: Partial; +}; + +export type GatewayState = { + forSubgraphExecution: Partial; +}; + +export function getMostSpecificState( + state: Partial & GraphQLState & GatewayState> = {}, +): Partial | undefined { + const { forOperation, forRequest, forSubgraphExecution } = state; + return forSubgraphExecution ?? forOperation ?? forRequest; +} + +// Brace yourself! TS Wizardry is coming! + +type PayloadWithState = T extends { + executionRequest: any; +} + ? T & { + state: Partial & GraphQLState> & + GatewayState; + } + : T extends { + executionRequest?: any; + } + ? T & { + state: Partial< + HttpState & GraphQLState & GatewayState + >; + } + : T extends { context: any } + ? T & { state: HttpState & GraphQLState } + : T extends { request: any } + ? T & { state: HttpState } + : T; + +type WithState = { + [K in keyof P]: P[K] extends ((payload: infer T) => infer R) | undefined + ? (payload: PayloadWithState) => R | undefined + : P[K]; +}; diff --git a/packages/plugins/opentelemetry/src/plugin.ts b/packages/plugins/opentelemetry/src/plugin.ts index 458e05bea..099dcc536 100644 --- a/packages/plugins/opentelemetry/src/plugin.ts +++ b/packages/plugins/opentelemetry/src/plugin.ts @@ -1,5 +1,5 @@ import { - type OnEnvelopedHookEventPayload, + type OnContextBuildingEventPayload, type OnExecuteEventPayload, type OnParseEventPayload, type OnValidateEventPayload, @@ -12,12 +12,7 @@ import type { OnFetchHookPayload, } from '@graphql-mesh/types'; import { getHeadersObj } from '@graphql-mesh/utils'; -import { - createDeferred, - isPromise, - MaybePromise, - type ExecutionRequest, -} from '@graphql-tools/utils'; +import { createDeferred, isPromise, MaybePromise } from '@graphql-tools/utils'; import { context, diag, @@ -36,11 +31,20 @@ import { type SpanProcessor } from '@opentelemetry/sdk-trace-base'; import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'; import { DisposableSymbols } from '@whatwg-node/disposablestack'; import { type OnRequestEventPayload } from '@whatwg-node/server'; +import type { OnParamsEventPayload, YogaInitialContext } from 'graphql-yoga'; import { ATTR_SERVICE_VERSION, SEMRESATTRS_SERVICE_NAME } from './attributes'; -import { OtelGraphqlContext } from './contextManager'; +import { OtelContextStack } from './contextManager'; +import { + getMostSpecificState, + withState, + type GatewayState, + type GraphQLState, + type HttpState, +} from './plugin-utils'; import { + addExecutionArgsToGraphqlSpan, + createGraphqlContextBuildingSpan, createHttpSpan, - endGraphQLSpan, endHttpSpan, startGraphQLExecuteSpan, startGraphQLParseSpan, @@ -137,7 +141,13 @@ export type OpenTelemetryGatewayPluginOptions = /** * Enable/disable GraphQL operation spans (default: true). */ - graphql?: BooleanOrPredicate>; + graphql?: BooleanOrPredicate>; + /** + * Enable/disable GraphQL context building phase (default: true). + */ + graphqlContextBuilding?: BooleanOrPredicate< + OnContextBuildingEventPayload + >; /** * Enable/disable GraphQL parse spans (default: true). */ @@ -177,6 +187,14 @@ export type OpenTelemetryContextExtension = { }; }; +type OtelState = { + otel: OtelContextStack; +}; + +type State = Partial< + HttpState & GraphQLState & GatewayState +>; + export function useOpenTelemetry( options: OpenTelemetryGatewayPluginOptions & { logger: Logger }, ): GatewayPlugin { @@ -193,57 +211,15 @@ export function useOpenTelemetry( const { promise: asyncAttributes, resolve: resolveAsyncAttributes } = createDeferred<{ [ATTR_SERVICE_VERSION]: string }>(); - const otelContextFor = { - request: new WeakMap(), - operation: new WeakMap(), // By graphql context - subgraphExecution: new WeakMap(), - }; - - function isParentEnabled(input: { - gqlCtx?: unknown; - request?: Request; - executionRequest?: any; - }): boolean { - const { request, gqlCtx, executionRequest: exr } = input; - if (request && !otelContextFor.request.has(request)) return false; - if (gqlCtx && !otelContextFor.operation.has(gqlCtx)) return false; - if (exr && !otelContextFor.subgraphExecution.has(exr)) return false; - return true; + function isParentEnabled(state: State): boolean { + const parentState = getMostSpecificState(state); + return !parentState || !!parentState.otel; } - function getContext( - ctx?: { - request: Request; - executionRequest?: any; - } | null, - ): Context { - if (useContextManager) { - return context.active(); - } - if (!ctx) { - return ROOT_CONTEXT; - } - - if (ctx.executionRequest) { - const ctxForSubgraph = otelContextFor.subgraphExecution.get( - ctx.executionRequest, - ); - if (ctxForSubgraph) { - return ctxForSubgraph.current; - } - } - - const ctxForOperation = otelContextFor.operation.get(ctx); - if (ctxForOperation) { - return ctxForOperation.current; - } - - const ctxForRequest = otelContextFor.request.get(ctx.request); - if (ctxForRequest) { - return ctxForRequest.current; - } - - return ROOT_CONTEXT; + function getContext(state?: State): Context { + return useContextManager + ? context.active() + : (getMostSpecificState(state)?.otel?.current ?? ROOT_CONTEXT); } const pluginLogger = options.logger.child('OpenTelemetry'); @@ -292,7 +268,12 @@ export function useOpenTelemetry( tracer = options.tracer || trace.getTracer('gateway'); } - return { + return withState< + GatewayPlugin, + OtelState, + OtelState, + OtelState + >({ onYogaInit({ yoga }) { resolveAsyncAttributes({ [ATTR_SERVICE_VERSION]: yoga.version }); }, @@ -304,7 +285,8 @@ export function useOpenTelemetry( return mapMaybePromise( preparation$, () => { - let { requestHandler, request, setRequestHandler } = onRequestPayload; + const { requestHandler, request, setRequestHandler, state } = + onRequestPayload; const { ctx } = createHttpSpan({ ctx: inheritContext @@ -323,225 +305,244 @@ export function useOpenTelemetry( setRequestHandler(context.bind(ctx, requestHandler)); } - otelContextFor.request.set(request, new OtelGraphqlContext(ctx)); + state.forRequest.otel = new OtelContextStack(ctx); }, (error) => { pluginLogger.error('Failed to start http span', { error }); }, ); }, - onResponse({ request, response }) { + onResponse({ response, state }) { try { - const ctx = otelContextFor.request.get(request); - ctx && endHttpSpan(ctx.root, response); + state.forRequest.otel && + endHttpSpan(state.forRequest.otel.root, response); } catch (error) { pluginLogger.error('Failed to end http span', { error }); } }, - onEnveloped(onEnvelopedPayload) { - const { extendContext, context: gqlCtx } = onEnvelopedPayload; - if (!isParentEnabled({ request: gqlCtx?.request })) { + onParams(onParamsPayload) { + const { setParamsHandler, paramsHandler, params, state } = + onParamsPayload; + const { forOperation, ...parentState } = state; + + if (!isParentEnabled(parentState)) { return; } - - if (shouldTrace(options.spans?.graphql, onEnvelopedPayload)) { - const { ctx } = startGraphQLSpan({ + if (shouldTrace(options.spans?.graphql, onParamsPayload)) { + const { ctx, done } = startGraphQLSpan({ tracer, - gqlContext: gqlCtx, - ctx: getContext(gqlCtx), + params, + ctx: getContext(parentState), }); - otelContextFor.operation.set(gqlCtx, new OtelGraphqlContext(ctx)); + forOperation.otel! = new OtelContextStack(ctx); + + const handler = useContextManager + ? context.bind(ctx, paramsHandler) + : paramsHandler; + + setParamsHandler((...args) => { + const result$ = handler(...args); + done(result$); + return result$; + }); } - extendContext({ - opentelemetry: { + const gqlCtx = onParamsPayload.context as YogaInitialContext & + OpenTelemetryContextExtension; + gqlCtx.opentelemetry = { + tracer, + activeContext: (): Context => getContext(state), + }; + }, + onContextBuilding(payload) { + const { state } = payload; + if (!isParentEnabled(state)) { + return; + } + + if (shouldTrace(options.spans?.graphqlContextBuilding, payload)) { + const { ctx, done } = createGraphqlContextBuildingSpan({ + ctx: getContext(state), tracer, - activeContext: (): Context => getContext(gqlCtx), - }, - }); + }); + + state.forOperation.otel!.push(ctx); + + return () => { + done(); + state.forOperation.otel!.pop(); + }; + } + + return; }, onParse(onParsePayload) { - const { context: gqlCtx } = onParsePayload; - - if (!isParentEnabled({ request: gqlCtx.request, gqlCtx })) { + const { state } = onParsePayload; + if (!isParentEnabled(state)) { return; } - if (shouldTrace(options.spans?.graphqlParse, onParsePayload)) { - const otelCtx = otelContextFor.operation.get(onParsePayload.context)!; const { context: gqlCtx, setParseFn, parseFn } = onParsePayload; const { ctx, done } = startGraphQLParseSpan({ - ctx: getContext(onParsePayload.context), + ctx: getContext(state), tracer, operationName: gqlCtx.params.operationName, query: gqlCtx.params.query?.trim(), }); - otelCtx.push(ctx); + state.forOperation.otel!.push(ctx); if (useContextManager) { setParseFn(context.bind(ctx, parseFn)); } return ({ result }) => { done(result); - otelCtx.pop(); + state.forOperation.otel!.pop(); }; } return; }, onValidate(onValidatePayload) { - const { context: gqlCtx } = onValidatePayload; - - if (!isParentEnabled({ request: gqlCtx.request, gqlCtx })) { + const { context: gqlCtx, state } = onValidatePayload; + if (!isParentEnabled(state)) { return; } - if (shouldTrace(options.spans?.graphqlValidate, onValidatePayload)) { - const otelCtx = otelContextFor.operation.get(gqlCtx)!; const { setValidationFn, validateFn } = onValidatePayload; const { ctx, done } = startGraphQLValidateSpan({ - ctx: getContext(onValidatePayload.context), + ctx: getContext(state), tracer, query: gqlCtx.params.query?.trim(), operationName: gqlCtx.params.operationName, }); - otelCtx?.push(ctx); + state.forOperation.otel!.push(ctx); if (useContextManager) { setValidationFn(context.bind(ctx, validateFn)); } return ({ result }) => { done(result); - otelCtx.pop(); + state.forOperation.otel!.pop(); }; } return; }, onExecute(onExecuteArgs) { - const gqlCtx = onExecuteArgs.args.contextValue; + const { state } = onExecuteArgs; - if (!isParentEnabled({ request: gqlCtx.request, gqlCtx })) { + if (!isParentEnabled(state)) { return; } - const otelCtx = otelContextFor.operation.get(gqlCtx)!; + addExecutionArgsToGraphqlSpan( + state.forOperation.otel!.root, + onExecuteArgs.args, + ); if (shouldTrace(options.spans?.graphqlExecute, onExecuteArgs)) { const { setExecuteFn, executeFn } = onExecuteArgs; const { ctx, done } = startGraphQLExecuteSpan({ - ctx: getContext(onExecuteArgs.args.contextValue), + ctx: getContext(state), args: onExecuteArgs.args, tracer, }); - otelCtx.push(ctx); + state.forOperation.otel!.push(ctx); if (useContextManager) { setExecuteFn(context.bind(ctx, executeFn)); } return { onExecuteDone(payload) { done(payload.result); - endGraphQLSpan(otelCtx.root, payload); - otelCtx.pop(); + state.forOperation.otel!.pop(); }, }; } - return { - onExecuteDone: (payload) => endGraphQLSpan(otelCtx.root, payload), - }; + return; }, onSubgraphExecute(onSubgraphPayload) { - const { context: gqlCtx } = onSubgraphPayload.executionRequest; + const { state } = onSubgraphPayload; + const { forSubgraphExecution, ...parentState } = state; - if (!isParentEnabled({ request: gqlCtx?.request, gqlCtx })) { + if (!isParentEnabled(parentState)) { return; } // Here it is possible that otelCtx is not present, because this hook can be triggered by // internal introspection queries, which are not linked to any client request, but should // still be traced and monitored. - const otelCtx = new OtelGraphqlContext( - getContext(onSubgraphPayload.executionRequest.context), - ); - - otelContextFor.subgraphExecution.set( - onSubgraphPayload.executionRequest, - otelCtx, - ); if (shouldTrace(options.spans?.subgraphExecute, onSubgraphPayload)) { const { subgraphName, executionRequest, executor, setExecutor } = onSubgraphPayload; const { ctx, done } = startSubgraphExecuteFetchSpan({ - ctx: getContext(onSubgraphPayload.executionRequest.context), + ctx: getContext(parentState), tracer, executionRequest, subgraphName, }); - otelCtx?.push(ctx); + forSubgraphExecution.otel = new OtelContextStack(ctx); if (useContextManager) { setExecutor(context.bind(ctx, executor)); } return ({ result }) => { done(result); - otelCtx?.pop(); + forSubgraphExecution.otel!.pop(); }; } return; }, onFetch(onFetchPayload) { - const { executionRequest } = onFetchPayload; - const gqlCtx = executionRequest?.context; - if ( - !isParentEnabled({ executionRequest, request: gqlCtx.request, gqlCtx }) - ) { + const { state, setFetchFn } = onFetchPayload; + if (!isParentEnabled(state)) { return; } // Here it is possible that otelCtx is not present, because this hook can be triggered by // internal introspection queries, which are not linked to any client request, but should // still be traced and monitored. - const otelCtx = - onFetchPayload.executionRequest && - otelContextFor.subgraphExecution.get(onFetchPayload.executionRequest); + let { fetchFn } = onFetchPayload; + const originalFetch = fetchFn; let onDone: OnFetchHookDone | undefined = void 0; - const contextDiscriminant = { - executionRequest, - request: executionRequest?.context?.request, - }; + if (propagateContext) { + fetchFn = (url, options, ...args) => { + const reqHeaders = getHeadersObj(options?.headers || {}); + propagation.inject(getContext(state), reqHeaders); + return originalFetch( + url, + { ...options, headers: reqHeaders }, + ...args, + ); + }; + } if (shouldTrace(options.spans?.upstreamFetch, onFetchPayload)) { - const { setFetchFn, fetchFn, url, options } = onFetchPayload; + const { url, options, executionRequest } = onFetchPayload; const { ctx, done } = startUpstreamHttpFetchSpan({ - ctx: getContext(contextDiscriminant), + ctx: getContext(state), tracer, url, fetchOptions: options, executionRequest, }); - otelCtx?.push(ctx); + state.forSubgraphExecution?.otel?.push(ctx); if (useContextManager) { - setFetchFn(context.bind(ctx, fetchFn)); + fetchFn = context.bind(ctx, fetchFn); } onDone = ({ response }) => { done(response); - otelCtx?.pop(); + state.forSubgraphExecution?.otel?.pop(); }; } - if (propagateContext) { - const { setOptions, options } = onFetchPayload; - const reqHeaders = getHeadersObj(options.headers || {}); - propagation.inject(getContext(contextDiscriminant), reqHeaders); - setOptions({ ...options, headers: reqHeaders }); - } + setFetchFn(fetchFn); return onDone; }, @@ -554,7 +555,7 @@ export function useOpenTelemetry( context.disable(); propagation.disable(); }, - }; + }); } function containsOnlyValues( diff --git a/packages/plugins/opentelemetry/src/spans.ts b/packages/plugins/opentelemetry/src/spans.ts index e83762708..975d0ed77 100644 --- a/packages/plugins/opentelemetry/src/spans.ts +++ b/packages/plugins/opentelemetry/src/spans.ts @@ -1,10 +1,11 @@ -import type { OnExecuteDoneEventPayload } from '@envelop/core'; import { defaultPrintFn } from '@graphql-mesh/transport-common'; import { getOperationASTFromDocument, isAsyncIterable, + mapMaybePromise, type ExecutionRequest, type ExecutionResult, + type MaybePromise, } from '@graphql-tools/utils'; import { SpanKind, @@ -80,21 +81,25 @@ export function endHttpSpan(ctx: Context, response: Response) { message: response.ok ? undefined : response.statusText, }); span.end(); - console.log('HTTP: span end'); } } export function startGraphQLSpan(input: { ctx: Context; tracer: Tracer; - gqlContext?: { params?: GraphQLParams } | null; -}): { ctx: Context } { - const operationName = input.gqlContext?.params?.operationName ?? 'unknown'; + params: GraphQLParams; +}): { + ctx: Context; + done: ( + result: MaybePromise>, + ) => void; +} { + const operationName = input.params.operationName ?? 'unknown'; const span = input.tracer.startSpan( `graphql.operation ${operationName}`, { attributes: { - [SEMATTRS_GRAPHQL_DOCUMENT]: input.gqlContext?.params?.query, + [SEMATTRS_GRAPHQL_DOCUMENT]: input.params.query, [SEMATTRS_GRAPHQL_OPERATION_NAME]: operationName, }, kind: SpanKind.INTERNAL, @@ -104,31 +109,62 @@ export function startGraphQLSpan(input: { return { ctx: trace.setSpan(input.ctx, span), + done: (result$) => { + return mapMaybePromise( + result$, + () => { + //FIXME: handle async iterable results. + span.end(); + }, + (err) => { + span.setStatus({ + code: SpanStatusCode.ERROR, + message: err.message, + }); + span.recordException(err); + span.end(); + throw err; + }, + ); + }, }; } -export function endGraphQLSpan( +export function addExecutionArgsToGraphqlSpan( ctx: Context, - payload: OnExecuteDoneEventPayload, + args: ExecutionArgs, ) { - //FIXME: handle async iterable results. const span = trace.getSpan(ctx); if (span) { const operation = getOperationASTFromDocument( - payload.args.document, - payload.args.operationName || undefined, + args.document, + args.operationName || undefined, ); const operationName = operation.name?.value ?? 'Anonymous'; - const document = defaultPrintFn(payload.args.document); + const document = defaultPrintFn(args.document); span.setAttribute(SEMATTRS_GRAPHQL_OPERATION_TYPE, operation.operation); span.setAttribute(SEMATTRS_GRAPHQL_OPERATION_NAME, operationName); span.setAttribute(SEMATTRS_GRAPHQL_DOCUMENT, document); span.updateName(`graphql.operation ${operationName}`); - span.end(); - console.log('ENVELOPED: span end'); } } +export function createGraphqlContextBuildingSpan(input: { + ctx: Context; + tracer: Tracer; +}): { ctx: Context; done: () => void } { + const span = input.tracer.startSpan( + 'graphql.context', + { kind: SpanKind.INTERNAL }, + input.ctx, + ); + + return { + ctx: trace.setSpan(input.ctx, span), + done: () => span.end(), + }; +} + export function startGraphQLParseSpan(input: { ctx: Context; tracer: Tracer; @@ -159,7 +195,6 @@ export function startGraphQLParseSpan(input: { }); } span.end(); - console.log('PARSE: span end'); }, }; } @@ -200,7 +235,6 @@ export function startGraphQLValidateSpan(input: { span.recordException(error); } } - console.log('VALIDATE: span end'); span.end(); }, }; @@ -254,7 +288,6 @@ export function startGraphQLExecuteSpan(input: { } } span.end(); - console.log('EXECUTE: span end'); }, }; } @@ -290,7 +323,6 @@ export function startSubgraphExecuteFetchSpan(input: { return { ctx: trace.setSpan(input.ctx, span), done: () => { - console.log('SUBGRAPH: span end'); return span.end(); }, }; @@ -329,7 +361,6 @@ export function startUpstreamHttpFetchSpan(input: { message: response.ok ? undefined : response.statusText, }); span.end(); - console.log('FETCH: span end'); }, }; } diff --git a/packages/plugins/prometheus/package.json b/packages/plugins/prometheus/package.json index 102779f59..71b7ecc41 100644 --- a/packages/plugins/prometheus/package.json +++ b/packages/plugins/prometheus/package.json @@ -40,7 +40,7 @@ }, "peerDependencies": { "graphql": "^15.9.0 || ^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "prom-client": "^13 || ^14.0.0 || ^15.0.0" }, "dependencies": { @@ -56,7 +56,7 @@ }, "devDependencies": { "graphql": "^16.9.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "pkgroll": "2.6.1", "prom-client": "15.1.3" }, diff --git a/packages/runtime/package.json b/packages/runtime/package.json index 0e90c5727..c050aeb34 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -79,7 +79,7 @@ "@whatwg-node/disposablestack": "^0.0.5", "@whatwg-node/server": "^0.9.60", "graphql-ws": "^5.16.0", - "graphql-yoga": "^5.11.0", + "graphql-yoga": "^5.10.11", "tslib": "^2.8.1" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 47de56c2c..e7c7b81a5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2326,7 +2326,7 @@ __metadata: "@graphql-mesh/compose-cli": "npm:^1.2.13" "@omnigraph/openapi": "npm:^0.108.6" graphql: "npm:^16.9.0" - graphql-yoga: "npm:^5.11.0" + graphql-yoga: "npm:^5.10.11" tslib: "npm:^2.8.1" languageName: unknown linkType: soft @@ -2359,7 +2359,7 @@ __metadata: dependencies: "@graphql-mesh/compose-cli": "npm:^1.2.13" graphql: "npm:^16.9.0" - graphql-yoga: "npm:^5.11.0" + graphql-yoga: "npm:^5.10.11" tslib: "npm:^2.8.1" languageName: unknown linkType: soft @@ -2439,7 +2439,7 @@ __metadata: "@graphql-mesh/hmac-upstream-signature": "workspace:^" "@graphql-mesh/plugin-jwt-auth": "npm:^1.4.0" graphql: "npm:^16.10.0" - graphql-yoga: "npm:^5.11.0" + graphql-yoga: "npm:^5.10.11" languageName: unknown linkType: soft @@ -2459,7 +2459,7 @@ __metadata: dependencies: "@graphql-mesh/compose-cli": "npm:^1.2.13" graphql: "npm:^16.9.0" - graphql-yoga: "npm:^5.11.0" + graphql-yoga: "npm:^5.10.11" tslib: "npm:^2.8.1" languageName: unknown linkType: soft @@ -2618,7 +2618,7 @@ __metadata: "@apollo/subgraph": "npm:^2.7.2" "@graphql-mesh/compose-cli": "npm:^1.2.13" graphql: "npm:^16.8.1" - graphql-yoga: "npm:^5.11.0" + graphql-yoga: "npm:^5.10.11" tslib: "npm:^2.8.1" languageName: unknown linkType: soft @@ -2663,7 +2663,7 @@ __metadata: "@apollo/subgraph": "npm:^2.9.3" "@graphql-hive/gateway": "workspace:*" graphql: "npm:16.10.0" - graphql-yoga: "npm:^5.11.0" + graphql-yoga: "npm:^5.10.11" tslib: "npm:^2.8.1" languageName: unknown linkType: soft @@ -2695,7 +2695,7 @@ __metadata: "@graphql-mesh/compose-cli": "npm:^1.2.13" graphql: "npm:16.10.0" graphql-sse: "npm:^2.5.3" - graphql-yoga: "npm:^5.11.0" + graphql-yoga: "npm:^5.10.11" tslib: "npm:^2.8.1" languageName: unknown linkType: soft @@ -2724,7 +2724,7 @@ __metadata: dependencies: "@graphql-mesh/compose-cli": "npm:^1.2.13" graphql: "npm:^16.9.0" - graphql-yoga: "npm:^5.11.0" + graphql-yoga: "npm:^5.10.11" tslib: "npm:^2.8.1" languageName: unknown linkType: soft @@ -2738,13 +2738,13 @@ __metadata: languageName: node linkType: hard -"@envelop/core@npm:^5.0.0, @envelop/core@npm:^5.0.2, @envelop/core@npm:^5.0.3": - version: 5.0.3 - resolution: "@envelop/core@npm:5.0.3" +"@envelop/core@npm:5.1.0-alpha-20250206123608-cd323a08c43c066eb34cba698d61b4f059ab5ee5": + version: 5.1.0-alpha-20250206123608-cd323a08c43c066eb34cba698d61b4f059ab5ee5 + resolution: "@envelop/core@npm:5.1.0-alpha-20250206123608-cd323a08c43c066eb34cba698d61b4f059ab5ee5" dependencies: - "@envelop/types": "npm:5.0.0" + "@envelop/types": "npm:5.1.0-alpha-20250206123608-cd323a08c43c066eb34cba698d61b4f059ab5ee5" tslib: "npm:^2.5.0" - checksum: 10c0/86f181137a4062554357151c717f068c89897364de0fd989b9abb408b03b4e8fc5946f8cdd76f2ff3ba5ab2e74140acf82210b18c32bb86875f2f18079bc19e2 + checksum: 10c0/0063d642ee434276434df08d5712e2d142139d62518b4dc8e638970da20e836db472063071f07f2462e2b7410e0d236a6d46e9147d06b0c6c7b3c03ab7ef92ef languageName: node linkType: hard @@ -2874,12 +2874,12 @@ __metadata: languageName: node linkType: hard -"@envelop/types@npm:5.0.0": - version: 5.0.0 - resolution: "@envelop/types@npm:5.0.0" +"@envelop/types@npm:5.1.0-alpha-20250206123608-cd323a08c43c066eb34cba698d61b4f059ab5ee5": + version: 5.1.0-alpha-20250206123608-cd323a08c43c066eb34cba698d61b4f059ab5ee5 + resolution: "@envelop/types@npm:5.1.0-alpha-20250206123608-cd323a08c43c066eb34cba698d61b4f059ab5ee5" dependencies: tslib: "npm:^2.5.0" - checksum: 10c0/0cbaa68218cb6121b58c6d354b0a17913ded042673df7bfcf385cac6c3b42713b82719875f553b31e8f059727ff5478ed11b33b4febf8deeaf902f1a92b212a8 + checksum: 10c0/a34d3e93e1f647c48db9cee9709739e50478e6c0c80f269aeef9bf0b2d802558f78eb6450fa62ff81b067bbb2f0429ad332ed0ba03da3b924a35c74f90a8dc1e languageName: node linkType: hard @@ -3243,7 +3243,7 @@ __metadata: graphql: "npm:^16.9.0" graphql-sse: "npm:^2.5.3" graphql-ws: "npm:^5.16.0" - graphql-yoga: "npm:^5.11.0" + graphql-yoga: "npm:^5.10.11" html-minifier-terser: "npm:7.2.0" pkgroll: "npm:2.6.1" tslib: "npm:^2.8.1" @@ -3308,7 +3308,7 @@ __metadata: graphql: "npm:^16.9.0" graphql-middleware: "npm:^6.1.35" graphql-ws: "npm:^5.16.0" - graphql-yoga: "npm:^5.11.0" + graphql-yoga: "npm:^5.10.11" parse-duration: "npm:^2.0.0" pkgroll: "npm:2.6.1" postject: "npm:^1.0.0-alpha.6" @@ -3505,7 +3505,7 @@ __metadata: "@whatwg-node/disposablestack": "npm:^0.0.5" constant-case: "npm:^3" graphql: "npm:^16.9.0" - graphql-yoga: "npm:^5.11.0" + graphql-yoga: "npm:^5.10.11" pkgroll: "npm:2.6.1" tslib: "npm:^2.8.1" peerDependencies: @@ -3525,7 +3525,7 @@ __metadata: "@graphql-tools/utils": "npm:^10.7.0" "@types/json-stable-stringify": "npm:^1.1.0" graphql: "npm:^16.9.0" - graphql-yoga: "npm:^5.11.0" + graphql-yoga: "npm:^5.10.11" json-stable-stringify: "npm:^1.1.1" pkgroll: "npm:2.6.1" tslib: "npm:^2.8.1" @@ -3683,7 +3683,7 @@ __metadata: "@whatwg-node/disposablestack": "npm:^0.0.5" "@whatwg-node/server": "npm:^0.9.65" graphql: "npm:^16.9.0" - graphql-yoga: "npm:^5.11.0" + graphql-yoga: "npm:^5.10.11" pkgroll: "npm:2.6.1" tslib: "npm:^2.8.1" peerDependencies: @@ -3703,13 +3703,13 @@ __metadata: "@graphql-yoga/plugin-prometheus": "npm:^6.5.3" "@whatwg-node/disposablestack": "npm:^0.0.5" graphql: "npm:^16.9.0" - graphql-yoga: "npm:^5.11.0" + graphql-yoga: "npm:^5.10.11" pkgroll: "npm:2.6.1" prom-client: "npm:15.1.3" tslib: "npm:^2.8.1" peerDependencies: graphql: ^15.9.0 || ^16.9.0 - graphql-yoga: ^5.11.0 + graphql-yoga: ^5.10.11 prom-client: ^13 || ^14.0.0 || ^15.0.0 languageName: unknown linkType: soft @@ -4075,7 +4075,7 @@ __metadata: "@whatwg-node/fetch": "npm:^0.10.1" extract-files: "npm:^11.0.0" graphql: "npm:^16.9.0" - graphql-yoga: "npm:^5.11.0" + graphql-yoga: "npm:^5.10.11" meros: "npm:^1.2.1" pkgroll: "npm:2.6.1" tslib: "npm:^2.8.1" @@ -11477,28 +11477,7 @@ __metadata: languageName: node linkType: hard -"graphql-yoga@npm:^5.11.0": - version: 5.11.0 - resolution: "graphql-yoga@npm:5.11.0" - dependencies: - "@envelop/core": "npm:^5.0.2" - "@graphql-tools/executor": "npm:^1.3.7" - "@graphql-tools/schema": "npm:^10.0.11" - "@graphql-tools/utils": "npm:^10.6.2" - "@graphql-yoga/logger": "npm:^2.0.1" - "@graphql-yoga/subscription": "npm:^5.0.3" - "@whatwg-node/fetch": "npm:^0.10.1" - "@whatwg-node/server": "npm:^0.9.64" - dset: "npm:^3.1.4" - lru-cache: "npm:^10.0.0" - tslib: "npm:^2.8.1" - peerDependencies: - graphql: ^15.2.0 || ^16.0.0 - checksum: 10c0/4cfe3fcf4cc6a771f8b5b50669bd640b53e04d82615a0985703adafb33386d6ea6af7bdb2f0ee882eeb378134d3447146b9bdfbbb36792253ec532e49f98ad9e - languageName: node - linkType: hard - -"graphql-yoga@npm:^5.7.0": +"graphql-yoga@npm:^5.10.11, graphql-yoga@npm:^5.7.0": version: 5.10.11 resolution: "graphql-yoga@npm:5.10.11" dependencies: