Skip to content
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

Merged
merged 7 commits into from
Nov 2, 2023

Conversation

shorgi
Copy link
Contributor

@shorgi shorgi commented Oct 19, 2023

From previous discussion, fix docs about:

  • the default subprotocol
  • requiring absolute paths for protocol config

Deploy preview:

@github-actions

This comment has been minimized.

@router-perf
Copy link

router-perf bot commented Oct 19, 2023

CI performance tests

  • events_big_cap_high_rate - Stress test for events with a lot of users, deduplication enabled and high rate event with a big queue capacity
  • events_without_dedup - Stress test for events with a lot of users and deduplication DISABLED
  • events - Stress test for events with a lot of users and deduplication ENABLED
  • large-request - Stress test with a 1 MB request payload
  • step - Basic stress test that steps up the number of users over time
  • xlarge-request - Stress test with 10 MB request payload
  • reload - Reload test over a long period of time at a constant rate of users
  • no-graphos - Basic stress test, no GraphOS.
  • xxlarge-request - Stress test with 100 MB request payload
  • step-jemalloc-tuning - Clone of the basic stress test for jemalloc tuning
  • const - Basic stress test that runs with a constant number of users

@shorgi shorgi marked this pull request as ready for review October 19, 2023 21:20
@shorgi shorgi requested a review from a team as a code owner October 19, 2023 21:20
> ⚠️ **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.
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.
Copy link
Contributor

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.

shorgi and others added 2 commits October 19, 2023 14:59
@shorgi shorgi requested a review from lleadbet October 19, 2023 23:06
@o0Ignition0o
Copy link
Contributor

I'm going to fix the conflicts and enable automerge, thanks!

@o0Ignition0o
Copy link
Contributor

I'm also adding a changelog entry (happy to edit it before we cut a release!)

@o0Ignition0o o0Ignition0o enabled auto-merge (squash) November 2, 2023 09:28
@o0Ignition0o o0Ignition0o merged commit 82c4cea into dev Nov 2, 2023
2 checks passed
@o0Ignition0o o0Ignition0o deleted the eh/docs/subs-setup branch November 2, 2023 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants