-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: send graphql-specific ping instead of ws ping frame (#117)
## Description When using the new keepalive functionality, we noticed that the pings are sent as [websocket ping frames][1] rather than as [graphql-transport-ws ping messages][2]. Aside from conforming to the protocol, the sub-protocol ping messages should be used to support a heartbeat mechanism from browser (i.e. wasm) clients, where there isn't a concept of ping / pong frames. Specifically, setting a `KeepAliveSettings::interval` from a browser client does not do anything right now. ## Testing Locally tested to confirm that the correct ping messages are now sent from browser clients (and that a gql-conforming server responds with the appropriate pong message). [1]: https://datatracker.ietf.org/doc/html/rfc6455#section-5.5.2 [2]: https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md#ping
- Loading branch information
Showing
4 changed files
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters