-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Description
The InputMapDefinesTooManyFieldsException returns null as locations, but the GraphqlErrorBuilder throws an exception for null as locations.
This seems inconsistent. Though it may not lead to direct conflicts in this project, it is confusing for using projects. For instance, the default error handling of graphql-spring-boot in consequence does not properly handle the InputMapDefinesTooManyFieldsException, see GraphQLErrorFromExceptionHandler#withThrowable.
Possible Solutions
I see three obvious directions:
- Commit to non-null locations on
GraphQLError. - Handle
nullas locations in theGraphqlErrorBuilder. - Keep the inconsistency and document it better, so that using frameworks or projects do not rely on false assumptions.
Open Question
Either solution would be fine for me and I may propose a pull request for it. The order above is just my personal preference. Which way to proceed?
Metadata
Metadata
Assignees
Labels
No labels