-
Notifications
You must be signed in to change notification settings - Fork 125
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
[gql_websocket_link/gql_link] SubscriptionError information is not propagated to the WebSocketLinkServerException #237
Comments
Related, the
graphql-transport-ws expects a list of GraphQL errors. graphql-ws from what I can see in the code is an object with a message property, in the PROTOCOL it just says and Error. I can see that this isn't standardized, but maybe it would reduce the need to implement a I thinks it makes sense to try to expect a payload like the one shown by @shyndman, since it's similar to a data Message and allows for multiple validation errors. Maybe be could implement a similar |
@juancastillo0 Thanks for taking a look at this. Do you think you can make a PR for this change? PS: Will this be fine |
Hi there,
I'm in a situation where a bad query provided to a
WebSocketLink
is resulting in aSubscriptionError
from the server. TheSubscriptionError
itself is quite descriptive, and provides enough information to debug the issue. However, that information is lost when parsing into aResponse
.A bit of digging suggests that
response_parser.dart
in thegql_link
package doesn't handleSubscriptionError
messages appropriately.To reproduce:
Send an invalid GQL document through a websocket link.
Attached is a screenshot of the JSONified message the response parser is dealing with:

Required for nhost/nhost-dart#24
The text was updated successfully, but these errors were encountered: