Cannot override SimpleDataFetcherExceptionHandler #384
Description
Hi,
Thank you for this great implementation. I am using version 7.0.1.
Facing problem with exception handling. Tried lots of different ways. like this one: https://github.com/leangen/graphql-spqr/issues/219
`@Configuration
public class GraphQLConfig {
@bean
public GraphQL graphQL(GraphQLSchema schema)
{
return GraphQL.newGraphQL(schema)
.queryExecutionStrategy(new AsyncExecutionStrategy(new CustomExceptionHandler()))
.mutationExecutionStrategy(new AsyncSerialExecutionStrategy(new CustomExceptionHandler()))
.build();
}
}Also have
public class CustomExceptionHandler implements DataFetcherExceptionHandler {
@OverRide
public DataFetcherExceptionHandlerResult onException(
DataFetcherExceptionHandlerParameters handlerParameters) {
Throwable exception = handlerParameters.getException();
// do something with exception
System.out.println("asdadad");
GraphQLError error = GraphqlErrorBuilder.newError().message(exception.getMessage()).build();
return DataFetcherExceptionHandlerResult.newResult().error(error).build();
}
}`
My CustomExceptionHandler is not triggering.
Please, help to solve this issue.
P.S: I am new in GraphQL, also sorry my english.