Conversation
Summary of ChangesHello @santino, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new end-to-end test suite designed to validate and showcase the programmatic usage of WebSocket subscriptions with the Hive Gateway. It addresses a need for clearer documentation and examples, ensuring that the gateway's automatic WebSocket support for federated services is well-demonstrated and easily reproducible for users. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This PR adds a new e2e test for WebSocket subscriptions, which is a great addition for both validation and documentation. The implementation is straightforward and covers the key aspects of programmatic WebSocket usage.
I've made a few suggestions to improve the robustness and consistency of the new test files:
- Using
localhostinstead of0.0.0.0for the client connection to improve cross-platform compatibility. - Adding type checks to handle API responses more safely.
- Adding missing newlines at the end of files for consistency.
Overall, this is a well-written PR that effectively demonstrates the WebSocket functionality.
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
@graphql-hive/gateway |
2.2.3-alpha-aa257c229ae98cb4def13d5695b520014dbe3b3e |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/nestjs |
2.0.32-alpha-aa257c229ae98cb4def13d5695b520014dbe3b3e |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/plugin-opentelemetry |
1.3.3-alpha-aa257c229ae98cb4def13d5695b520014dbe3b3e |
npm ↗︎ unpkg ↗︎ |
🚀 Snapshot Release (Bun Docker Image)The latest changes of this PR are available as image on GitHub Container Registry (based on the declared |
🚀 Snapshot Release (Node Docker Image)The latest changes of this PR are available as image on GitHub Container Registry (based on the declared |
Ref GW-125
Description
This PR adds a new e2e test
websocket-programmatic-usagethat demonstrates WebSocket subscription support in the Hive Gateway. The test serves as both validation and documentation for users who want to use WebSocket subscriptions programmatically.Changes
Added Files:
e2e/websocket-programmatic-usage/websocket-programmatic-usage.e2e.ts- E2E test for WebSocket subscriptionse2e/websocket-programmatic-usage/package.json- Test dependenciese2e/websocket-programmatic-usage/mesh.config.ts- Mesh configuratione2e/websocket-programmatic-usage/services/api.ts- GraphQL service with subscriptionsWhat the Test Demonstrates
The test validates that the Hive Gateway automatically provides WebSocket support for GraphQL subscriptions when using the mesh composition approach. It shows:
ws://localhost:4000/graphqlGenerated Example
When this PR is merged, the CI will automatically generate a complete example in
examples/websocket-programmatic-usage/that users can run locally to see WebSocket subscriptions in action.Context
This addresses user feedback about needing better documentation/examples for WebSocket usage. The auto-generated example serves as living documentation showing how to set up and use WebSocket subscriptions with the Hive Gateway.
Testing
The test passes and validates the WebSocket functionality end-to-end. The CI will also generate and validate the example works correctly.