hasura / hasura/graphql-engine

Receiving keep alive message before connection_ack when subscribing

Open
#7,002 1 comment 5 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

When I subscribe using websockets to Hasura Cloud it seems that I receive a keep alive message (GQL_CONNECTION_KEEP_ALIVE) before I have even sent the connection_init message (GQL_CONNECTION_INIT) to the server.

See image below:
![bild](https://user-images.githubusercontent.com/11295259/120308041-f341dd00-c2d3-11eb-816d-1aa5005e1f49.png)
This will cause a problem for some Graph QL clients that expects a connection_ack (GQL_CONNECTION_ACK) as first message.

According to this document https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md it seems that the keep alive messages should be sent right after a connection_ack message and then periodically to keep the connection alive.

I would like Hasura to only send the keep alive messages after the connection has been made and a GQL_CONNECTION_ACK has been sent from the server.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.