Wrap Query with execueBlocking
Hello,
so you see this: https://github.com/vert-x3/vertx-examples/blob/master/core-examples/src/main/java/io/vertx/example/core/execblocking/ExecBlockingExample.java
i just ask, if it's possible to wrap SchemaDefinition.class
@Override
public void queryWithVariables(String graphqlQuery, JsonObject variables,
Handler<AsyncResult<QueryResult>> resultHandler) {
try {
QueryResult result = queryBlocking(graphqlQuery, variables);
resultHandler.handle(Future.succeededFuture(result));
} catch (RuntimeException ex) {
resultHandler.handle(Future.failedFuture(ex));
}
}
I know it's not perfect, but otherwise, a syncron datafetcher will block the thread. and it should be an easy task until graphql-java has the async implementation ?
Or are they other concerns and it will not work ?
Thanks Marcel
Thanks Marcel, for your PR, which I merged into a separate branch as explained in the PR comment.
Please use #10 now. It contains the new java graphl version
@marcelalburg thanks for PR'ing :+1: