You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Client opens new WebSocket connection with Graphl server and sends GQL_CONNECTION_INIT
Server in response sends GQL_CONNECTION_ACK and GQL_CONNECTION_KEEP_ALIVE
The client sends 1st subscription query
The client sends a 2nd subscription query
Some time passes, the client receives GQL_CONNECTION_KEEP_ALIVE messages every 15 seconds
2nd subscription query is completed. On completed server aborts sending GQL_CONNECTION_KEEP_ALIVE messages even though 1st subscription query is still not completed.
In such a scenario the client will disconnect from the server because of missing GQL_CONNECTION_KEEP_ALIVE messages. The conclusion is - server should not stop sending keep-alive messages when subscription completes. It should happen when the WebSocket connection is closed.
Take a look at the specification of GQL_COMPLETE and GQL_KEEP_ALIVE. It says nothing about stopping sending GQL_KEEP_ALIFE after sending GQL_COMPLTE:
GQL_COMPLETE
Server sends this message to indicate that a GraphQL operation is done, and no more data will arrive for the specific operation.
id: string : operation ID of the operation that completed
GQL_CONNECTION_KEEP_ALIVE
Server message that should be sent right after each GQL_CONNECTION_ACK processed and then periodically to keep the client connection alive.
The client starts to consider the keep alive message only upon the first received keep alive message from the server.
The text was updated successfully, but these errors were encountered:
Consider the following scenario:
In such a scenario the client will disconnect from the server because of missing GQL_CONNECTION_KEEP_ALIVE messages. The conclusion is - server should not stop sending keep-alive messages when subscription completes. It should happen when the WebSocket connection is closed.
Take a look at the specification of GQL_COMPLETE and GQL_KEEP_ALIVE. It says nothing about stopping sending GQL_KEEP_ALIFE after sending GQL_COMPLTE:
The text was updated successfully, but these errors were encountered: