Skip to content

Code 4205 vs CloseCode.Forbidden? #319

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

You must be logged in to vote

Guess you're referencing the "Client usage with graceful restart" recipe. The code is freely chosen to be outside of the fatal codes list so that the client may restart after the socket closes. No definition for the "Client Restart" code in graphql-ws because it's not compulsory, the implementor may choose any close code he wants for restarting purposes.

It's called "Client Restart" because the client closes the connection to restart. The idea is, for example, when your connectionParams change you want to reconnect to the server passing along the new parameters - hence, the client needs a restart. Check out PostGraphile's PostGraphiQL for a concrete example.

All custom close codes in grap…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by theogravity
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