Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Cannot return several errors for one GraphQL request #970

Closed
@kisroman

Description

@kisroman

Now there is no ability to throw two errors, we can only implode it in one string(as in #961 in method getAddressErrors()).

If you create exception GraphQlInputException it has method addError(), so you can add additional errors, but it doesn't work.See screenshot, I added two errors with method addError(), but it returns only one.

Actual result:
Only one last error is returned.
Screen Shot 2019-09-27 at 13 42 29

Expected result:

{
  "errors": [
    {
      "message": "First error.",
      "extensions": {
        "category": "graphql"
      },
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ]
    },
    {
      "message": "Second error.",
      "extensions": {
        "category": "graphql"
      },
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ]
    }
  ]
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions