-
Notifications
You must be signed in to change notification settings - Fork 317
Support for GraphQL over WebSocket Ping
and Pong
message types
#270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@ExidCuter Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@ExidCuter Thank you for signing the Contributor License Agreement! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure WebGraphQlHandler
should be involved. It's more of an internal API for invoking the WebInterceptor chain, it's not meant to be implemented by an application. I think for now we would simply respond to the the ping with a pong. The payload on the pong is optional.
Hi, I'm not quite sure I understand your comment. Do you mean I should remove I added methods to |
Yes, I meant that those methods should be removed from |
Ping
and Pong
message types
The code has evolved since, so I've applied the equivalent change manually, also on the client side since these are bidrectional messages. Thanks for the PR in any case! |
|
Yes the server replies automatically. There isn't a way to send pings. |
This PR implements the missing
PING
andPONG
GraphQL WS messages for the client-side "heartbeat / keep alive" function.Now the system does not close the connection when it receives a
PING
message, but sends a corresponding (PONG
) message back, as specified in the graphql-ws protocol.