Skip to content

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

@kristjanvalur

Description

@kristjanvalur

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions