graphql-dotnet / graphql-dotnet/graphql-client
WebSocket handler in GRAPHQL_TRANSPORT_WS protocol should not send GQL_COMPLETE when closing connection
- Dominant language
- C#
- Stars
- 648
- Forks
- 136
- PR merge metrics
- No merged PRs in 30d
Description
Web socket handler for recently implemented `graphql-transport-ws` protocol sends invalid message type when closing connection:
https://github.com/graphql-dotnet/graphql-client/blob/master/src/GraphQL.Client/Websocket/GraphQLTransportWSProtocolHandler.cs#L269
which results in message:
```json
{"type": "complete"}
```
According to [graphql-transport-ws](https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md#complete) messages with type `complete` should contain an `id` of a subscription.
I'm using this library with a server written in different language and for every such message I'm getting a response `"Missing map member: 'id'"` - which I believe is justified.
IMO when closing `graphql-transport-ws` connection only active subscriptions should be closed but no additional messages should be sent.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.