Skip to content

Commit 2cbe0ed

Browse files
Upcoming Release Changes (#668)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent fc03004 commit 2cbe0ed

File tree

3 files changed

+28
-27
lines changed

3 files changed

+28
-27
lines changed

.changeset/khaki-buses-trade.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# graphql-ws
22

3+
## 6.0.8
4+
5+
### Patch Changes
6+
7+
- [#667](https://github.com/enisdenjo/graphql-ws/pull/667) [`fc03004`](https://github.com/enisdenjo/graphql-ws/commit/fc0300468644ea117142bc94adbda5d79181828b) Thanks [@endigma](https://github.com/endigma)! - Fix the server sending a `Complete` message after an `Error` message for subscriptions.
8+
9+
Previously, when a subscription's async iterable threw an error, the server would send:
10+
11+
```
12+
{"id":"1","type":"error","payload":[{"message":"..."}]}
13+
{"id":"1","type":"complete"}
14+
```
15+
16+
Per the protocol spec:
17+
18+
> **Error:** This message terminates the operation and no further messages will be sent.
19+
20+
> **Complete (Server → Client):** If the server dispatched the `Error` message relative to the original `Subscribe` message, no `Complete` message will be emitted.
21+
22+
The server now correctly sends only the `Error` message:
23+
24+
```
25+
{"id":"1","type":"error","payload":[{"message":"..."}]}
26+
```
27+
28+
Clients that correctly follow the spec should be unaffected, as they are expected to ignore messages for operations they consider already completed.
29+
330
## 6.0.7
431

532
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphql-ws",
3-
"version": "6.0.7",
3+
"version": "6.0.8",
44
"type": "module",
55
"description": "Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client",
66
"repository": {

0 commit comments

Comments
 (0)