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

Validation handling inconsistent for queries vs. subsctiptions over graphql-transport-ws #3673

Open
kristjanvalur opened this issue Oct 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kristjanvalur
Copy link
Contributor

kristjanvalur commented Oct 16, 2024

Describe the Bug

A websocket connection can be used to perform queries as well as subscription. With subsciption schemas, a validation error results in a error message before the subscription commences. For query schemas, the same validation error results in a "next" message containing "errors" in its
ExecutionResult member.

This kind of different error handling is inconvenient. In the case of queries, it makes it harder to distinguish between a validation error and an error resulting from the query execution.

System Information

  • Operating system:
  • Strawberry version (if applicable):

Additional Context

I have created PR #3671 to illustrate the problem. It contains behavioural tests taken from a separate PR validation graphql-transport-ws based behaviour.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@kristjanvalur kristjanvalur added the bug Something isn't working label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant