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 T
addError(GraphQLError error)
Adds the error to any existing the errors for this builderT
addErrors(java.util.List<GraphQLError> errors)
Adds the error list to any existing the errors for this builderT
addExtension(java.lang.String key, java.lang.Object value)
Adds a new entry into the extensions map for this builderExecutionResult
build()
T
data(java.lang.Object data)
Sets new data into the builderT
errors(java.util.List<GraphQLError> errors)
Sets error list as the errors for this builderT
extensions(java.util.Map<java.lang.Object,java.lang.Object> extensions)
Sets the extension map for this builderT
from(ExecutionResult executionResult)
Sets values into the builder based on a previousExecutionResult
-
-
-
Method Detail
-
from
public T from(ExecutionResult executionResult)
Description copied from interface:ExecutionResult.Builder
Sets values into the builder based on a previousExecutionResult
- Specified by:
from
in 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.Builder
Sets new data into the builder- Specified by:
data
in 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.Builder
Sets error list as the errors for this builder- Specified by:
errors
in 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.Builder
Adds the error list to any existing the errors for this builder- Specified by:
addErrors
in 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.Builder
Adds the error to any existing the errors for this builder- Specified by:
addError
in 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.Builder
Sets the extension map for this builder- Specified by:
extensions
in 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.Builder
Adds a new entry into the extensions map for this builder- Specified by:
addExtension
in 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:
build
in interfaceExecutionResult.Builder<T extends ExecutionResultImpl.Builder<T>>
- Returns:
- a newly built
ExecutionResult
-
-