-
Notifications
You must be signed in to change notification settings - Fork 273
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
Clarify and fix docs about supported WebSocket subprotocols #4063
Conversation
This comment has been minimized.
This comment has been minimized.
CI performance tests
|
> ⚠️ **Your router must use whichever subprotocol is expected by each of your subgraphs!** | ||
- This subprotocol is the **default value** and is recommended for GraphQL server libraries implementing WebSocket-based subscriptions. | ||
- `graphql_ws` | ||
- Legacy subprotocol used by the [`subscriptions-transport-ws` library](https://github.com/apollographql/subscriptions-transport-ws), which is **unmaintained** but provided for backward compatibility. |
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.
We need to flip the bullets here- graphql_ws
is for graphql-ws
library, and vice versa.
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.
ugh, I got tripped up after reading again https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md#communication stating The WebSocket sub-protocol for this specification is: graphql-transport-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.
I know it's soooo confusing, I don't know what's the right answer here, maybe we could rename that field and use protocol_name
or I don't know :p I'm open to any suggestions
|
||
By default, the router uses `graphql_ws` for all subgraphs. You can change this global default and/or override it for individual subgraphs by setting the `protocol` key as shown above. |
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.
This is actually the current (and preferred) behavior.
Co-authored-by: Maria Elisabeth Schreiber <[email protected]>
I'm going to fix the conflicts and enable automerge, thanks! |
I'm also adding a changelog entry (happy to edit it before we cut a release!) |
From previous discussion, fix docs about:
Deploy preview: