Skip to content

Allow to update connectionParams #504

Answered by enisdenjo
geoynomous asked this question in Q&A
Discussion options

You must be logged in to vote

The connection parameters are intentionally long lived alongside the connection and should not be updated, the GraphQL over WebSocket spec even disallows multiple ConnectionInit messages.

To get different parameters in the context, you close and have the client reconnect - as you already do.

If you don't want to close the connection, but do want to send some metadata to the server: you should use client-side pings and populate the payload. The "client usage with manual pings and pongs" recipe might help you out to get going.

Hope this helps!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by enisdenjo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #503 on September 27, 2023 18:06.