Do not create "error" message from ExecutionResult

Fix gh-320
This commit is contained in:
rstoyanchev
2022-03-09 12:26:45 +00:00
parent f6b9fdfe7c
commit f42563424e
2 changed files with 6 additions and 6 deletions

View File

@@ -197,9 +197,8 @@ public class GraphQlWebSocketHandler implements WebSocketHandler {
});
}
else {
// Single response (query or mutation)
outputFlux = (CollectionUtils.isEmpty(output.getErrors()) ? Flux.just(output) :
Flux.error(new IllegalStateException("Execution failed: " + output.getErrors())));
// Single response (query or mutation) that may contain errors
outputFlux = Flux.just(output);
}
return outputFlux
@@ -236,4 +235,6 @@ public class GraphQlWebSocketHandler implements WebSocketHandler {
private static class SubscriptionExistsException extends RuntimeException {
}
}

View File

@@ -238,9 +238,8 @@ public class GraphQlWebSocketHandler extends TextWebSocketHandler implements Sub
});
}
else {
// Single response (query or mutation)
outputFlux = (CollectionUtils.isEmpty(output.getErrors()) ? Flux.just(output)
: Flux.error(new IllegalStateException("Execution failed: " + output.getErrors())));
// Single response (query or mutation) that may contain errors
outputFlux = Flux.just(output);
}
return outputFlux