This release includes several improvements and bug fixes.
Subscription support
The big ticket item of 6.0 is support for graphql subscriptions. A subscription is a stream of results sent out by applying a graphql query over changing results.
This explains more : http://graphql.org/blog/subscriptions-in-graphql-and-relay/ in a general sense.
The graphql-java support is based on returning a reactive stream of ExecutionResult
. Each time something changes on the subscription a new ExecutionResult
is sent down to the Subscriber
.
Systems like RxJava have support for the http://www.reactive-streams.org/ interfaces and with Java 9 you can write trivial adaptors to turn reactive stream Subscriber
s into Java 9 Flow.Subscribers
s
See #754
Performance of Data Loader
The efficiency of data loader has be improved. Before it was too eager is calling dispatch which meant that lists of data cause early dispatches. The code has improved to handle this and the data loader batching is delayed into the last possible moment, greatly increasing the batching efficiency
See #764
Validation problems are now errors not exceptions
In line with the reference graphql-js implementation, validation and coercion problems are reported as errors and not exceptions.
See #789
Tracing Support now has parsing and validation timings
The Apollo Tracing spec was updated to include timings for parsing and validation and this is now reflected correctly.
See #784
API enhancements
A small API enhancement to make it easier to use the TypeResolution class as well as the ability to override the exceptions from the query complexity checkers.
There is also more data available via the TypeResolutionEnvironment class.
There is also a new AsyncDataFetcher to help compose asynchronous data fetchers.
See #774
See #778
See #795
See #798