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.
GraphQLErrorFromExceptionHandler doesn`t work for AbortExecutionException #612
Closed
Description
I use the DDOS Feature Query Depth and configured a query depth of 3 maxQueryDepth: 3
. If the query depth is larger than 3 an AbortExecutionException
will be thrown. Thats ok!! But the processing of the AbortExecutionException
leads to an incorrect output -> A JSON rendering problem. The problem seems to be in the following method:
class GraphQLErrorFromExceptionHandler extends DefaultGraphQLErrorHandler {
@Override
protected List<GraphQLError> filterGraphQLErrors(List<GraphQLError> errors) {
return errors.stream().map(this::transform).flatMap(Collection::stream)
.collect(Collectors.toList());
}
After this method is called the debugging session stops on @SneakyThrows
in GraphQLObjectMapper
.
@SneakyThrows
public String serializeResultAsJson(ExecutionResult executionResult) {
return getJacksonMapper()
.writeValueAsString(createResultFromExecutionResult(executionResult));
}
If I disable the use of GraphQLErrorFromExceptionHandler
it works!! - For disableing I have to set the property exception-handlers-enabled: false
and no use of @ExceptionHandler
annotations in my resolvers.