Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSocket handler in GRAPHQL_TRANSPORT_WS protocol should not send GQL_COMPLETE when closing connection #651

Open
pziezio opened this issue Jul 4, 2024 · 1 comment

Comments

@pziezio
Copy link

pziezio commented Jul 4, 2024

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:

{"type": "complete"}

According to graphql-transport-ws 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.

@hubaozhang2000
Copy link

hubaozhang2000 commented Aug 30, 2024

@pziezio @rose-a
There are several issues for the same problem:

#620

#599

The problem was introduced from 5.1.1 to 6.0.0 change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants