This repository was archived by the owner on Dec 19, 2023. It is now read-only.
This repository was archived by the owner on Dec 19, 2023. It is now read-only.
Custom implementation of GraphQLErrorHandler no longer supported? #379
Closed
Description
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.
@Component
public class CustomGraphQLErrorHandler implements GraphQLErrorHandler
Is this a feature to no longer support bring your own GraphQLErrorHandler?