You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
Previously you could bring your own implementation of GraphQLErrorHandler.
Now, this is always set to the DefaultGraphQLErrorHandler.
The correct custom implementation is still created and injected into the objectmapper etc.
But when the GraphQLErrorStartupListener executes onApplicationEvent, the injected ErrorHandlerSupplier (with the correct custom implementation variable at this point) is always overridden with the exception handlers (org.springframework.web.bind.annotation.ExceptionHandler) or the DefaultGraphQLErrorHandler.
This is done in GraphQLErrorStartupListener -> GraphQLErrorHandlerFactory -> override implementation.
The issue is because GraphQLObjectMapper being overriden. So for those still on 7.0.1, just create the following bean in any configuration class and you should be good to go.
The custom exception handler in this code snippet is GraphQLExceptionHandler. Rest of them are library classes. The Exception handler should be exposed as a Bean or a Component.
Hi,
Previously you could bring your own implementation of GraphQLErrorHandler.
Now, this is always set to the DefaultGraphQLErrorHandler.
The correct custom implementation is still created and injected into the objectmapper etc.
But when the GraphQLErrorStartupListener executes onApplicationEvent, the injected ErrorHandlerSupplier (with the correct custom implementation variable at this point) is always overridden with the exception handlers (org.springframework.web.bind.annotation.ExceptionHandler) or the DefaultGraphQLErrorHandler.
This is done in GraphQLErrorStartupListener -> GraphQLErrorHandlerFactory -> override implementation.
Done in following PR:
#305
E.g.
Is this a feature to no longer support bring your own GraphQLErrorHandler?
The text was updated successfully, but these errors were encountered: