github Netflix/dgs-framework v8.6.0

latest releases: v9.0.0, v8.8.0-rc.1, v8.7.1...
21 days ago

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"
      }
    }
  ]
}

Don't miss a new dgs-framework release

NewReleases is sending notifications on new releases.