-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Add connection_error to protocol #112
Comments
I was looking through the server side code and it looks like the current implementation closes on failure following |
Exactly as @michelepra suggested. The WebSocket close event is meant to communicate the connection close reason. You're free to pick any user-land close code number within 4000-4999 and whatever close reason string you like (or even a stringified JSON if you want to transfer more meaning). Use the client-side |
Hasura GraphQL uses a |
This Also read #112 (comment). |
But is is actually used in real applications that are deployed out there... Maybe it should be added to the PROTOCOL.md in this repo ? |
Mainly because deprecated subscriptions-transport-ws is still out there. |
I'm struggling to see any upside to not adding it to PROTOCOL.md, but I clearly see the downside: people connecting to existing applications not being able to debug connection errors. Maybe the upside is avoiding to encourage new implementers to use it instead of the connection close reason ? But then, the spec could just say that. The spec in this repo is not of much use if it does not describe what's actually out there. |
As explained in #112 (comment), the |
Story
Currently there is no way to send an error if a semantically invalid message is sent on
connection_init
.It would be great if the protocol supported a
connection_error
message similar to this.Acceptance criteria
connection_init
id
attributeThe text was updated successfully, but these errors were encountered: