-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Currently, the GraphQL.execute(request) method blocks until the result is ready, unlike graphql-js, which lets you handle the result in a callback.
Here, we propose an asynchronous rendition of graphql-java, which will allow you to not only execute a GraphQL request in a non-blocking manner, but also permit the data fetcher to wrap it's results in a CompletableFuture.
Since our implementation relies on a Java 8 feature, it is being published as a separate project called graphql-java-async, so as to not impinge on graphql-java's Java 6 compatibility requirements.
A non-blocking version of the famous "hello world" can be found in the README file. A more involved scenario involving publishing and subscribing to news articles can be seen in this groovy test case.
Is this something that could go as a "related project" under graphql-java?
-Karthick Sankarachary