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).
Description
When using the new keepalive functionality, we noticed that the pings are sent as websocket ping frames rather than as graphql-transport-ws ping messages.
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).