Package graphql.execution
Class AsyncSerialExecutionStrategy
- java.lang.Object
-
- graphql.execution.ExecutionStrategy
-
- graphql.execution.AbstractAsyncExecutionStrategy
-
- graphql.execution.AsyncSerialExecutionStrategy
-
@PublicApi public class AsyncSerialExecutionStrategy extends AbstractAsyncExecutionStrategy
Async non-blocking execution, but serial: only one field at the time will be resolved. SeeAsyncExecutionStrategyfor a non-serial (parallel) execution of every field.
-
-
Field Summary
-
Fields inherited from class graphql.execution.ExecutionStrategy
dataFetcherExceptionHandler, executionStepInfoFactory, fieldCollector
-
-
Constructor Summary
Constructors Constructor Description AsyncSerialExecutionStrategy()AsyncSerialExecutionStrategy(DataFetcherExceptionHandler exceptionHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<ExecutionResult>execute(ExecutionContext executionContext, ExecutionStrategyParameters parameters)This is the entry point to an execution strategy.-
Methods inherited from class graphql.execution.AbstractAsyncExecutionStrategy
handleResults
-
Methods inherited from class graphql.execution.ExecutionStrategy
assertNonNullFieldPrecondition, assertNonNullFieldPrecondition, completeField, completeValue, completeValueForEnum, completeValueForList, completeValueForList, completeValueForNull, completeValueForObject, completeValueForScalar, createExecutionStepInfo, fetchField, getFieldDef, getFieldDef, getNormalizedField, handleFetchingException, handleNonNullException, mkNameForPath, mkNameForPath, mkNameForPath, resolveField, resolveFieldWithInfo, resolveType, toIterable, unboxPossibleDataFetcherResult
-
-
-
-
Constructor Detail
-
AsyncSerialExecutionStrategy
public AsyncSerialExecutionStrategy()
-
AsyncSerialExecutionStrategy
public AsyncSerialExecutionStrategy(DataFetcherExceptionHandler exceptionHandler)
-
-
Method Detail
-
execute
public java.util.concurrent.CompletableFuture<ExecutionResult> execute(ExecutionContext executionContext, ExecutionStrategyParameters parameters) throws NonNullableFieldWasNullException
Description copied from class:ExecutionStrategyThis is the entry point to an execution strategy. It will be passed the fields to execute and get values for.- Specified by:
executein classExecutionStrategy- Parameters:
executionContext- contains the top level execution parametersparameters- contains the parameters holding the fields to be executed and source object- Returns:
- a promise to an
ExecutionResult - Throws:
NonNullableFieldWasNullException- in the future if a non null field resolves to a null value
-
-