Code 4205 vs CloseCode.Forbidden? #319
-
I've seen 4205 defined as I saw in another thread for codes: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code That 4205 would fall in the private use section. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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 It's called "Client Restart" because the client closes the connection to restart. The idea is, for example, when your All custom close codes in When choosing the close codes, I tend to loosely map over the HTTP status codes. For example:
No, both are considered retryable by the client. They merely transfer meaning helping the implementor understand or act accordingly. |
Beta Was this translation helpful? Give feedback.
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…