Package graphql
Class ExecutionResultImpl.Builder<T extends ExecutionResultImpl.Builder<T>>
- java.lang.Object
-
- graphql.ExecutionResultImpl.Builder<T>
-
- All Implemented Interfaces:
ExecutionResult.Builder<T>
- Direct Known Subclasses:
IncrementalExecutionResultImpl.Builder
- Enclosing class:
- ExecutionResultImpl
public static class ExecutionResultImpl.Builder<T extends ExecutionResultImpl.Builder<T>> extends java.lang.Object implements ExecutionResult.Builder<T>
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TaddError(GraphQLError error)Adds the error to any existing the errors for this builderTaddErrors(java.util.List<GraphQLError> errors)Adds the error list to any existing the errors for this builderTaddExtension(java.lang.String key, java.lang.Object value)Adds a new entry into the extensions map for this builderExecutionResultbuild()Tdata(java.lang.Object data)Sets new data into the builderTerrors(java.util.List<GraphQLError> errors)Sets error list as the errors for this builderTextensions(java.util.Map<java.lang.Object,java.lang.Object> extensions)Sets the extension map for this builderTfrom(ExecutionResult executionResult)Sets values into the builder based on a previousExecutionResult
-
-
-
Method Detail
-
from
public T from(ExecutionResult executionResult)
Description copied from interface:ExecutionResult.BuilderSets values into the builder based on a previousExecutionResult- Specified by:
fromin interfaceExecutionResult.Builder<T extends ExecutionResultImpl.Builder<T>>- Parameters:
executionResult- the previousExecutionResult- Returns:
- the builder
-
data
public T data(java.lang.Object data)
Description copied from interface:ExecutionResult.BuilderSets new data into the builder- Specified by:
datain interfaceExecutionResult.Builder<T extends ExecutionResultImpl.Builder<T>>- Parameters:
data- the data to use- Returns:
- the builder
-
errors
public T errors(java.util.List<GraphQLError> errors)
Description copied from interface:ExecutionResult.BuilderSets error list as the errors for this builder- Specified by:
errorsin interfaceExecutionResult.Builder<T extends ExecutionResultImpl.Builder<T>>- Parameters:
errors- the errors to use- Returns:
- the builder
-
addErrors
public T addErrors(java.util.List<GraphQLError> errors)
Description copied from interface:ExecutionResult.BuilderAdds the error list to any existing the errors for this builder- Specified by:
addErrorsin interfaceExecutionResult.Builder<T extends ExecutionResultImpl.Builder<T>>- Parameters:
errors- the errors to add- Returns:
- the builder
-
addError
public T addError(GraphQLError error)
Description copied from interface:ExecutionResult.BuilderAdds the error to any existing the errors for this builder- Specified by:
addErrorin interfaceExecutionResult.Builder<T extends ExecutionResultImpl.Builder<T>>- Parameters:
error- the error to add- Returns:
- the builder
-
extensions
public T extensions(java.util.Map<java.lang.Object,java.lang.Object> extensions)
Description copied from interface:ExecutionResult.BuilderSets the extension map for this builder- Specified by:
extensionsin interfaceExecutionResult.Builder<T extends ExecutionResultImpl.Builder<T>>- Parameters:
extensions- the extensions to use- Returns:
- the builder
-
addExtension
public T addExtension(java.lang.String key, java.lang.Object value)
Description copied from interface:ExecutionResult.BuilderAdds a new entry into the extensions map for this builder- Specified by:
addExtensionin interfaceExecutionResult.Builder<T extends ExecutionResultImpl.Builder<T>>- Parameters:
key- the key of the extension entryvalue- the value of the extension entry- Returns:
- the builder
-
build
public ExecutionResult build()
- Specified by:
buildin interfaceExecutionResult.Builder<T extends ExecutionResultImpl.Builder<T>>- Returns:
- a newly built
ExecutionResult
-
-