-
Notifications
You must be signed in to change notification settings - Fork 25
Hive Gateway tester and testing utilities #1625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5caf53f to
9a72245
Compare
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
@graphql-tools/batch-delegate |
10.0.2-alpha-f555607556652b06a7b1e5c992d6d87454afc1e5 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/delegate |
11.0.2-alpha-f555607556652b06a7b1e5c992d6d87454afc1e5 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/federation |
4.0.6-alpha-f555607556652b06a7b1e5c992d6d87454afc1e5 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/fusion-runtime |
1.2.6-alpha-f555607556652b06a7b1e5c992d6d87454afc1e5 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/gateway |
2.1.11-alpha-f555607556652b06a7b1e5c992d6d87454afc1e5 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/logger |
1.0.7-alpha-f555607556652b06a7b1e5c992d6d87454afc1e5 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/nestjs |
2.0.16-alpha-f555607556652b06a7b1e5c992d6d87454afc1e5 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/plugin-aws-sigv4 |
2.0.11-alpha-f555607556652b06a7b1e5c992d6d87454afc1e5 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/plugin-opentelemetry |
1.0.13-alpha-f555607556652b06a7b1e5c992d6d87454afc1e5 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-prometheus |
2.0.14-alpha-f555607556652b06a7b1e5c992d6d87454afc1e5 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/gateway-runtime |
2.1.10-alpha-f555607556652b06a7b1e5c992d6d87454afc1e5 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/stitch |
10.0.3-alpha-f555607556652b06a7b1e5c992d6d87454afc1e5 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/stitching-directives |
4.0.2-alpha-f555607556652b06a7b1e5c992d6d87454afc1e5 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/gateway-testing |
1.0.0-alpha-f555607556652b06a7b1e5c992d6d87454afc1e5 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-common |
1.0.7-alpha-f555607556652b06a7b1e5c992d6d87454afc1e5 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-http |
1.0.7-alpha-f555607556652b06a7b1e5c992d6d87454afc1e5 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-http-callback |
1.0.7-alpha-f555607556652b06a7b1e5c992d6d87454afc1e5 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-ws |
2.0.7-alpha-f555607556652b06a7b1e5c992d6d87454afc1e5 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/wrap |
11.0.2-alpha-f555607556652b06a7b1e5c992d6d87454afc1e5 |
npm ↗︎ unpkg ↗︎ |
🚀 Snapshot Release (Node Docker Image)The latest changes of this PR are available as image on GitHub Container Registry (based on the declared |
🚀 Snapshot Release (Bun Docker Image)The latest changes of this PR are available as image on GitHub Container Registry (based on the declared |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new testing package (@graphql-hive/gateway-testing) that provides utilities for testing Hive Gateway configurations, supporting supergraph, subgraph composition, and proxy modes with explicit resource management through await using. The PR also refactors existing internal tests to use the new tester, demonstrating its usage across different testing scenarios.
Key changes:
- New
@graphql-hive/gateway-testingpackage withcreateGatewayTesterutility - Support for explicit resource management (
await usingand manualdispose()) - Refactored tests across multiple packages to use the new testing utilities
Reviewed Changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/testing/src/index.ts | Core implementation of the gateway tester with support for supergraph, subgraph, and proxy modes |
| packages/testing/package.json | Package configuration for the new testing utilities |
| packages/runtime/tests/upstream-timeout.test.ts | Refactored to use createGatewayTester instead of direct runtime creation |
| packages/runtime/tests/subscriptions.test.ts | Simplified subscription tests using the new tester utilities |
| packages/runtime/tests/propagateHeaders.spec.ts | Refactored header propagation tests with new testing approach |
| packages/runtime/src/types.ts | Exported previously internal interfaces for use in testing package |
| packages/plugins/prometheus/tests/prometheus.spec.ts | Updated Prometheus plugin tests to use gateway tester |
| packages/plugins/hmac-upstream-signature/tests/hmac-upstream-signature.spec.ts | Simplified HMAC signature tests with new testing utilities |
| packages/plugins/aws-sigv4/tests/aws-sigv4-outgoing.test.ts | Refactored AWS SigV4 outgoing request tests |
| packages/plugins/aws-sigv4/tests/aws-sigv4-incoming.test.ts | Updated AWS SigV4 incoming request tests with minor header type correction |
| .changeset/dry-numbers-deliver.md | Changeset documenting the new testing package |
| .changeset/@graphql-hive_plugin-aws-sigv4-1625-dependencies.md | Changeset documenting AWS SDK dependency update |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'content-type': 'application/json', | ||
| Host: 'sigv4examplegraphqlbucket.s3-eu-central-1.amazonaws.com', | ||
| 'Content-Length': 30, | ||
| 'Content-Length': '30', |
Copilot
AI
Oct 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Content-Length header value has been changed from a number (30) to a string ('30'). This may indicate a breaking change in how headers are handled. Verify that the gateway and AWS SigV4 signing logic correctly handle Content-Length as a string, as HTTP headers are typically strings but the signature calculation might expect specific formatting.
| 'content-type': 'application/json', | ||
| Host: 'sigv4examplegraphqlbucket.s3-eu-central-1.amazonaws.com', | ||
| 'Content-Length': 30, | ||
| 'Content-Length': '30', |
Copilot
AI
Oct 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Content-Length header value has been changed from a number (30) to a string ('30'). This may indicate a breaking change in how headers are handled. Verify that the gateway and AWS SigV4 signing logic correctly handle Content-Length as a string, as HTTP headers are typically strings but the signature calculation might expect specific formatting.
TODO
await using gw = createGatewayTester())dispose()as alternative toawait using