public class BatchedExecutionStrategy extends ExecutionStrategy
DataFetcher
s 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.fieldCollector, valuesResolver
Constructor and Description |
---|
BatchedExecutionStrategy() |
Modifier and Type | Method and Description |
---|---|
ExecutionResult |
execute(ExecutionContext executionContext,
GraphQLObjectType parentType,
java.lang.Object source,
java.util.Map<java.lang.String,java.util.List<Field>> fields) |
completeValue, completeValueForEnum, completeValueForList, completeValueForScalar, getFieldDef, resolveField, resolveType, resolveType
public ExecutionResult execute(ExecutionContext executionContext, GraphQLObjectType parentType, java.lang.Object source, java.util.Map<java.lang.String,java.util.List<Field>> fields)
execute
in class ExecutionStrategy