Skip to content
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

feat: implement graphql-ws ping/pong #852

Merged
merged 1 commit into from Aug 27, 2022

Conversation

andreialecu
Copy link
Contributor

Fixes #851

Here's a screenshot to confirm:

Screenshot 2022-08-27 at 20 12 54

@andreialecu
Copy link
Contributor Author

Not sure why some other lines got reformatted, I ran npm run lint:fix

@andreialecu andreialecu marked this pull request as draft August 27, 2022 17:23
@andreialecu
Copy link
Contributor Author

I set it to draft while I verify some things. I'm still unsure if the graphql-ws client can properly understand server-sent keep-alive messages, a.k.a. Server -> Client.

However, at least this works Client -> Server and mercurius now responds properly.

@andreialecu andreialecu marked this pull request as ready for review August 27, 2022 17:40
@andreialecu
Copy link
Contributor Author

Confirmed to work bidirectionally. There was a minor issue that I fixed and force pushed.

Notice by the arrows how some are incoming and some outgoing, but it works both ways.

Screenshot 2022-08-27 at 20 40 30

Copy link
Collaborator

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit cf42b6e into mercurius-js:master Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compatibility with graphql-ws keepAlive
2 participants