Skip to content

Subscription messages contain both data and errors #729

@mihai-dinculescu

Description

@mihai-dinculescu

Describe the bug
Successful messages contain an empty array errors property, while error messages contain a null data property.

{
  "data": {
    "users": {
      "name": "stream user"
    }
  },
  "errors": []
}
{
  "data": {
    "users": null
  },
  "errors": [
    {
      "message": "some field error from handler",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "users"
      ],
      "extensions": "some additional string"
    }
  ]
}

To Reproduce
Run the warp_subscriptions example

Expected behavior
Succesful messages should contain only data. Error messages should contain only errors.

Additional context
Introduced by #721

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions