github Netflix/dgs-framework v8.6.0

latest releases: v9.1.3, v9.1.2, v9.1.1...
6 months 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.