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

Conversation

pstarritt-evooq
Copy link

If a GraphQLErrorHandler is present, do not override with ExceptionHandler factories or DefaultGraphQLErrorHandler.

#379

@oliemansm oliemansm linked an issue Apr 3, 2020 that may be closed by this pull request
@oliemansm
Copy link
Member

Thanks! Does this break the scenario that #305 intended to solve, or does that use case still work now too?

@pstarritt-evooq
Copy link
Author

pstarritt-evooq commented Apr 3, 2020

Thanks! Does this break the scenario that #305 intended to solve, or does that use case still work now too?

No problem :)
I believe it will still work.

If the application does not have a custom implementation of the GraphQLErrorHandler, then upon broadcast of ApplicationReadyEvent (Only once per app with all ErrorHandlers in the ApplicationContext present) - the ErrorHandlerSupplier's errorHandler is null - therefore it would still invoke logic including GraphQLErrorHandlerFactory().create. If they had custom implementation as well then it would have got overridden anyway. So if one had the custom bean, they should remove it as it was not actually used. To sum up: A custom GraphQLErrorHandler implementation bean will be chosen first.

@oliemansm oliemansm added this to the 7.0.2 milestone Apr 3, 2020
@oliemansm oliemansm merged commit 93684b3 into graphql-java-kickstart:master Apr 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom implementation of GraphQLErrorHandler no longer supported?
2 participants