Skip to content

Ping/pong implementation with Apollo Server Express #278

Answered by enisdenjo
BeauGieskens asked this question in Q&A
Discussion options

You must be logged in to vote

Please read #231 (comment) and #231 (reply in thread) in detail first (and optionally about why the client doesn't need to ping the server: #117 (comment)), before proceeding with subprotocol pings/pongs.

TL;DR you most probably do not need them.

Is it even possible to set up the ping/pong messages with an Apollo Server Express configuration?

Yes. You have to make your own graphql-ws WebSocket server as showcased in the "server usage with ws and subprotocol pings and pongs" recipe and use it instead of the useServer in your Apollo Server.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by BeauGieskens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants