crystal
crystal copied to clipboard
Websocket server doesn't have a keepAlive
Summary
Reading the websocket server implementation here, I noticed that there are no keepAlive processes.
https://github.com/graphile/crystal/blob/4fe66c21bc4280315b2ae1ce5d39c7a933bb259f/grafast/grafserv/src/servers/node/index.ts
Possible Solution
Instead of directly using makeServer, graphql-ws offers a higher level useServer function, which wraps makeServer with keepAlive processes via a single parameter. If nothing else, its source could be a useful guide:
https://the-guild.dev/graphql/ws/docs/use/ws/functions/useServer