@PublicApi public class BatchedExecutionStrategy extends ExecutionStrategy
DataFetchers that have
DataFetcher.get(DataFetchingEnvironment) methods annotated with Batched. See the javadoc comment on
Batched for a more detailed description of batched data fetchers.
The strategy runs a BFS over terms of the query and passes a list of all the relevant sources to the batched data fetcher.
Normal DataFetchers can be used, however they will not see benefits of batching as they expect a single source object at a time.dataFetcherExceptionHandler, fieldCollector, valuesResolver| Constructor and Description |
|---|
BatchedExecutionStrategy() |
BatchedExecutionStrategy(DataFetcherExceptionHandler dataFetcherExceptionHandler) |
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.CompletableFuture<ExecutionResult> |
execute(ExecutionContext executionContext,
ExecutionStrategyParameters parameters)
This is the entry point to an execution strategy.
|
assertNonNullFieldPrecondition, assertNonNullFieldPrecondition, completeField, completeValue, completeValueForEnum, completeValueForList, completeValueForScalar, fetchField, fieldTypeInfo, getFieldDef, getFieldDef, handleNonNullException, resolveField, resolveTypeForInterface, resolveTypeForUnionpublic BatchedExecutionStrategy()
public BatchedExecutionStrategy(DataFetcherExceptionHandler dataFetcherExceptionHandler)
public java.util.concurrent.CompletableFuture<ExecutionResult> execute(ExecutionContext executionContext, ExecutionStrategyParameters parameters)
ExecutionStrategyexecute in class ExecutionStrategyexecutionContext - contains the top level execution parametersparameters - contains the parameters holding the fields to be executed and source objectExecutionResult