@PublicApi @Deprecated public class BatchedExecutionStrategy extends ExecutionStrategy
BatchedExecutionStrategy has been deprecated in favour ofExecution Strategy that minimizes calls to the data fetcher when used in conjunction with
DataLoaderDispatcherInstrumentation. BatchedExecutionStrategy does not properly implement the graphql runtime specification. Specifically it does not correctly handle non null fields and how they are to cascade up their parent fields. It has proven an intractable problem to make this code handle these cases. See http://facebook.github.io/graphql/October2016/#sec-Errors-and-Non-Nullability We will remove it once we are sure the alternative is as least good as the BatchedExecutionStrategy.
DataFetchers that have
DataFetcher.get(DataFetchingEnvironment)methods annotated with
Batched. See the javadoc comment on
Batchedfor 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.
|Constructor and Description|
|Modifier and Type||Method and Description|
This is the entry point to an execution strategy.
assertNonNullFieldPrecondition, assertNonNullFieldPrecondition, completeField, completeValue, completeValueForEnum, completeValueForList, completeValueForList, completeValueForObject, completeValueForScalar, fetchField, fieldTypeInfo, getFieldDef, getFieldDef, handleNonNullException, resolveField, resolveFieldWithInfo, resolveType, resolveTypeForInterface, resolveTypeForUnion, toIterable, toIterable, unboxPossibleOptional
public BatchedExecutionStrategy(DataFetcherExceptionHandler dataFetcherExceptionHandler)
public java.util.concurrent.CompletableFuture<ExecutionResult> execute(ExecutionContext executionContext, ExecutionStrategyParameters parameters)