GraphQL Subscriptions are a powerful feature in GraphQL that allow clients to receive updates in real-time. However, implementing them over WebSockets is not ideal due to several problems such as statefulness, security issues, bidirectional communication, and usability problems with Server-Side Rendering (SSR).
We've chosen SSE/Fetch to implement GraphQL Subscriptions instead, which offers a modern, easy-to-use API that's performant, secure, and allows for SSR. The SSE/Fetch approach is stateless, disallows the client from sending arbitrary data, can be easily secured with the Token Handler Pattern, and supports HTTP/2. It also enables simple implementation of SSR for GraphQL Subscriptions. With 93.76% of all browsers supporting HTTP/2, 94.65% supporting SSE, and 93.62% supporting Fetch, it's time to migrate from WebSockets to SSE/Fetch for GraphQL Subscriptions.