Skip to content

Commit d285c9f

Browse files
authored
GraphQLOverSSE: note including an empty data field in the complete message (#290)
1 parent dc44fb2 commit d285c9f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rfcs/GraphQLOverSSE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ interface CompleteMessage {
4848
}
4949
```
5050

51+
> [!IMPORTANT]
52+
> Include an empty `data: ` field when sending the message to a client that uses [EventSource](https://developer.mozilla.org/en-US/docs/Web/API/EventSource). If the field is omitted, the complete event won't trigger the listener.
53+
5154
## Single connection mode
5255

5356
> When **not used over HTTP/2**, SSE suffers from a limitation to the maximum number of open connections, which can be specially painful when opening various tabs as the limit is per browser and set to a very low number (6). The issue has been marked as "Won't fix" in [Chrome](https://bugs.chromium.org/p/chromium/issues/detail?id=275955) and [Firefox](https://bugzilla.mozilla.org/show_bug.cgi?id=906896). This limit is per browser + domain, so that means that you can open 6 SSE connections across all of the tabs to `www.example1.com` and another 6 SSE connections to `www.example2.com`. (from [Stackoverflow](https://stackoverflow.com/a/5326159/1905229)). When using HTTP/2, the maximum number of simultaneous HTTP streams is negotiated between the server and the client (defaults to 100).

0 commit comments

Comments
 (0)