feat(graphql): reply with pong when the server sends a ping - #878
Merged
Conversation
The graphql-transport-ws protocol defines ping/pong as bidirectional and requires the receiving party to answer a ping as soon as possible. The client only ever sent pings, so a server-initiated ping fell through to 'unrecognized' and was silently dropped. Inert on the legacy endpoint, which never initiates a ping (its heartbeat is 'ka'); this prepares the client for /graphql/subscription-v2, whose handler is configured with a 10s keep-alive that pings idle connections. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
KonradPaluch
approved these changes
Aug 3, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Answer a server-initiated
pingwith apong, as thegraphql-transport-wsprotocol requires, in preparation for the/graphql/subscription-v2migration.Why
PROTOCOL.md defines
Ping/Pongas bidirectional:The client only ever sent pings and received pongs. A server-initiated
pinghas noid, so it fell throughparseIncomingMessage's default tounrecognized, found no subscriber, and was silently dropped.