Skip to content

v8.6.0

Compare
Choose a tag to compare
@github-actions github-actions released this 10 May 18:17
· 104 commits to refs/heads/master since this release
c3e01f7

What’s Changed

This PR converts errors from graphql-java thrown prior to data fetcher processing, such as various Validation errors to use the TypedGraphQLError format to be consistent with the other errors handled in the DGS framework. The main change is to add additional errorDetail and errorType fields as part of extensions. The message, location, classification are all preserved as is.

We expect this will not be a breaking change unless users are depending on the exact string formatted error. An example of the updated error is shown below:

{
  "errors": [
    {
      "message": "Validation error (FieldUndefined@[hellos]) : Field 'hellos' in type 'Query' is undefined",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "hellos"
      ],
      "extensions": {
        "classification": "ValidationError",
        "errorType": "BAD_REQUEST",
        "errorDetail": "FIELD_NOT_FOUND"
      }
    }
  ]
}