Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

GQL_CONNECTION_ERROR being sent from Client -> Server on exception during client connection #724

Closed
tcheard opened this issue Dec 19, 2019 · 0 comments

Comments

@tcheard
Copy link

tcheard commented Dec 19, 2019

GQL_CONNECTION_ERROR (connection_error) is defined as a Server -> Client message type:

https://github.com/apollographql/subscriptions-transport-ws/blob/faa219cff7b6f9873cae59b490da46684d7bea19/PROTOCOL.md#gql_connection_error

public static GQL_CONNECTION_ERROR = 'connection_error'; // Server -> Client

Yet if an exception occurs while setting up connection params or sending the connection_init, this message type is sent from Client -> Server:

this.sendMessage(undefined, MessageTypes.GQL_CONNECTION_ERROR, error);

If the client can't set up a connection, it likely shouldn't be sending a connection_error message to the server.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants