@sanity/client 6.28.4-resources.4 → 6.28.5-goaway.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1003,6 +1003,7 @@ The method will emit different types of events:
1003
1003
  - `message`: Regular event messages.
1004
1004
  - `restart`: Emitted when the event stream restarts.
1005
1005
  - `reconnect`: Emitted when the client reconnects to the event stream.
1006
+ - `goaway`: Emitted when when the connection is rejected or had to be closed, eg. if connection limits are reached and the client should switch data fetching strategy from live to polling.
1006
1007
  - `welcome`: Emitted when the client successfully connects to the event stream.
1007
1008
 
1008
1009
  To listen to updates in draft content, set `includeDrafts` to `true`
@@ -1176,7 +1176,8 @@ class LiveClient {
1176
1176
  "message",
1177
1177
  "restart",
1178
1178
  "welcome",
1179
- "reconnect"
1179
+ "reconnect",
1180
+ "goaway"
1180
1181
  ]).pipe(
1181
1182
  reconnectOnConnectionFailure(),
1182
1183
  operators.map((event) => {