Open SkeLLLa opened 3 years ago
Looks like a bug somewhere between mercurius and fastify-websocket.
You can get the websocket via https://github.com/websockets/ws/blob/HEAD/doc/ws.md#event-connection, you should have the websocket server exposed via https://github.com/fastify/fastify-websocket/blob/c99252b99d2ed23ca804d85a75805f8c3e199d96/index.js#L37. If you register fastify-websocket before mercurius, your instance will be used instead. Look at https://github.com/mercurius-js/mercurius/blob/6740402d9cfbde237169b0cd31d2fe348f912a28/lib/subscription.js#L63-L72 for more details.
Can you write a small repro?
Yes, I'll try to create a reproduction. So far I can tell that bug might be connected to create react app built-in proxy, because before such errors like
"path":"/sockjs-node","msg":"closed incoming websocket connection for path with no websocket handler"
I've recently had some errors in logs after which the whole server got crashed.
Here's an example:
Is there any way to add custom error handler to it, to log more details?