Inconsistent Websocket Behavior #656
Replies: 1 comment 3 replies
-
1001 is a "Going Away" close code that indicates that the server is shutting down. graphql-ws uses it when it's being disposed. But, it's also an internal close code - so it might be the same as with 1006. 1006 is a reserved/internal WebSocket close code. graphql-ws does not use it. It happens on unexpected errors with browsers and/or servers - most likely firewall or some intermittent proxy issues. In essence, there is nothing you (or me) can do in terms of graphql-ws and 1006. You can either debug with the user's security team and start with investigating their firewalls - or you can switch to Server-Sent Events with graphql-sse (I recommend this anyway). I am also the maintainer of graphql-sse so the API is almost exactly the same. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I've noticed inconsistent socket behavior across browsers. In chrome, socket works and stays connected, however some users on our app have reported in Edge and Firefox socket connects and immediately disconnects with status codes 1001 and 1006 respectfully.
Any suggestions on what could be causing this, or how to navigate debugging it?
Some precursor context:
NestJS api running Mercurius and Fastify.
Frontend is a nextjs app running apollo client.
Any help would be appreciated :)
Beta Was this translation helpful? Give feedback.
All reactions