Server Sent Events
Cons
- maximum 6 per browser + domain,
- unidirectional, but
- "When subscribing to an information source, you make one descriptive request in order to receive multiple responses. Specifically, when using GraphQL subscriptions or streaming operations (like with @defer (Private) and @stream (Private) directives), you do exactly this - you send one request and expect multiple responses (events) in return. Having said this, Server-Sent Events seem like a perfect fit!"
Comparison
vs Websocket
- "Built-in support for reconnection"
- You can only have six concurrent open SSE connections per browser at any one time. This can be especially painful when you want to open multiple tabs with SSE connections. See 'Server-Sent Events and browser limits' for more information and workaround suggestions.
References
- https://ably.com/blog/websockets-vs-sse
- https://the-guild.dev/blog/graphql-over-sse
- mentions: GraphQL Sse
Backlinks