Package graphql.execution.reactive
Class ReactiveSupport
java.lang.Object
graphql.execution.reactive.ReactiveSupport
This provides support for a DataFetcher to be able to
return a reactive streams
Publisher or Java JDK Flow.Publisher
as a value, and it can be turned into a CompletableFuture
that we can get an async value from.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectfetchedObject(Object fetchedObject) static <T> org.reactivestreams.Publisher<T> whenPublisherFinishes(org.reactivestreams.Publisher<T> publisher, Consumer<? super Throwable> atTheEndCallback) Our reactiveSingleSubscriberPublishersupports only a single subscription so this can be used a delegate to perform a call back when the given Publisher actually finishes without adding an extra subscription to the delegate Publisher
-
Constructor Details
-
ReactiveSupport
public ReactiveSupport()
-
-
Method Details
-
fetchedObject
-
whenPublisherFinishes
public static <T> org.reactivestreams.Publisher<T> whenPublisherFinishes(org.reactivestreams.Publisher<T> publisher, Consumer<? super Throwable> atTheEndCallback) Our reactiveSingleSubscriberPublishersupports only a single subscription so this can be used a delegate to perform a call back when the given Publisher actually finishes without adding an extra subscription to the delegate Publisher- Type Parameters:
T- for two- Parameters:
publisher- the publisher to wrapatTheEndCallback- the callback when thePublisherhas finished
-