Package graphql.execution.incremental
Class DeferredFragmentCall
- java.lang.Object
-
- graphql.execution.incremental.DeferredFragmentCall
-
- All Implemented Interfaces:
IncrementalCall<DeferPayload>
public class DeferredFragmentCall extends java.lang.Object implements IncrementalCall<DeferPayload>
Represents a deferred call (aka @defer) to get an execution result sometime after the initial query has returned.A deferred call can encompass multiple fields. The deferred call will resolve once all sub-fields resolve.
For example, this query:
{ post { ... @defer(label: "defer-post") { text summary } } }
Will result on 1 instance of `DeferredCall`, containing calls for the 2 fields: "text" and "summary".
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DeferredFragmentCall.FieldWithExecutionResult
-
Constructor Summary
Constructors Constructor Description DeferredFragmentCall(java.lang.String label, ResultPath path, java.util.List<java.util.function.Supplier<java.util.concurrent.CompletableFuture<DeferredFragmentCall.FieldWithExecutionResult>>> calls, DeferredCallContext deferredCallContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResultPath
getPath()
java.util.concurrent.CompletableFuture<DeferPayload>
invoke()
-
-
-
Constructor Detail
-
DeferredFragmentCall
public DeferredFragmentCall(java.lang.String label, ResultPath path, java.util.List<java.util.function.Supplier<java.util.concurrent.CompletableFuture<DeferredFragmentCall.FieldWithExecutionResult>>> calls, DeferredCallContext deferredCallContext)
-
-
Method Detail
-
getPath
public ResultPath getPath()
-
invoke
public java.util.concurrent.CompletableFuture<DeferPayload> invoke()
- Specified by:
invoke
in interfaceIncrementalCall<DeferPayload>
-
-