Closed
Description
I can't tell if this is bad API use on my end, as I'm not an expert with Reactor/Async etc.
But my controllers that return a Completable future of a List type e.g
@QueryMapping
public CompletableFuture<List<String>> jobNumbers(Instant timestamp, DataFetchingEnvironment env) {
return CompletableFuture.completedFuture(List.of("123"));
}
return bad error messages when there are any exceptions outside of the CompletableFuture. In this case, I missed the @Argument
annotation on the timestamp parameter but only got this generic message:
n.graphql.execution.ExecutionStrategy : Can't resolve value (/jobNumbers) : type mismatch error, expected type LIST got class reactor.core.publisher.MonoError
Or if the type is a String it simply just gets passed through to the final query like this:
{
"data": {
"jobNumbers": "MonoError"
}
}