-
Notifications
You must be signed in to change notification settings - Fork 348
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
fix/feat(serve): WebSockets for GW/Client comm #7766
Conversation
The build artifacts of |
The build artifacts of |
Apollo Federation Subgraph Compatibility Results
Learn more: |
🚀 Snapshot Release (
|
Package | Version | Info |
---|---|---|
@graphql-hive/gateway |
1.3.0-alpha-20241017125351-19cd1c2d9a00f9217e1b38b0aa023f2e54a731d6 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/hmac-upstream-signature |
1.2.0-alpha-20241017125351-19cd1c2d9a00f9217e1b38b0aa023f2e54a731d6 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-jwt-auth |
1.2.0-alpha-20241017125351-19cd1c2d9a00f9217e1b38b0aa023f2e54a731d6 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-opentelemetry |
1.3.0-alpha-20241017125351-19cd1c2d9a00f9217e1b38b0aa023f2e54a731d6 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-operation-headers |
1.2.0-alpha-20241017125351-19cd1c2d9a00f9217e1b38b0aa023f2e54a731d6 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-prometheus |
1.2.0-alpha-20241017125351-19cd1c2d9a00f9217e1b38b0aa023f2e54a731d6 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/serve-cli |
1.3.0-alpha-20241017125351-19cd1c2d9a00f9217e1b38b0aa023f2e54a731d6 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/serve-runtime |
1.2.0-alpha-20241017125351-19cd1c2d9a00f9217e1b38b0aa023f2e54a731d6 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-http-callback |
0.5.0-alpha-20241017125351-19cd1c2d9a00f9217e1b38b0aa023f2e54a731d6 |
npm ↗︎ unpkg ↗︎ |
💻 Website PreviewThe latest changes are available as preview in: https://51789e9a.graphql-mesh.pages.dev |
The build artifacts of |
The build artifacts of |
Published
|
Published
|
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.
Are these #7208 fully covered too?
packages/serve-cli/src/server.ts
Outdated
const { WebSocketServer } = await import('ws'); | ||
const wsServer = new WebSocketServer({ | ||
path: gwRuntime.graphqlEndpoint, | ||
server, | ||
}); | ||
const graphqlWSOptions = getGraphQLWSOptions(gwRuntime); | ||
const { useServer } = await import('graphql-ws/lib/use/ws'); |
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.
Why dynamic imports? Dynamic imports make it hard for bundlers.
e8b0fd0
to
185ed5b
Compare
* fix/feat(serve): WebSockets for GW/Client comm * chore(dependencies): updated changesets for modified dependencies * Fix unit tests * Fix e2e * Disable v18 for WS * Avoid dynamic imports * Add an option to enable/disable WebSockets --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Expose WebSockets server for the gateway and the client communication
Previously it wasn't possible to communicate with the gateway via WebSockets, now this implements it, updates the tests to make sure the gateway is accessible through WebSockets
node:http
server in serve-clionRequest
is not invoked when using WebSockets with uWS, therefore we cannot assign a schema to a request inuseSchema
Yoga plugin - do something else(Now setting the schema in onSubscribe hook of graphql-ws)
Closes #7208