public class ExecutionResultImpl extends java.lang.Object implements ExecutionResult
Modifier and Type | Class and Description |
---|---|
static class |
ExecutionResultImpl.Builder |
Constructor and Description |
---|
ExecutionResultImpl(GraphQLError error) |
ExecutionResultImpl(java.util.List<? extends GraphQLError> errors) |
ExecutionResultImpl(java.lang.Object data,
java.util.List<? extends GraphQLError> errors) |
ExecutionResultImpl(java.lang.Object data,
java.util.List<? extends GraphQLError> errors,
java.util.Map<java.lang.Object,java.lang.Object> extensions) |
Modifier and Type | Method and Description |
---|---|
<T> T |
getData() |
java.util.List<GraphQLError> |
getErrors() |
java.util.Map<java.lang.Object,java.lang.Object> |
getExtensions() |
boolean |
isDataPresent() |
static ExecutionResultImpl.Builder |
newExecutionResult() |
java.util.Map<java.lang.String,java.lang.Object> |
toSpecification()
The graphql specification says that result of a call should be a map that follows certain rules on what items
should be present.
|
java.lang.String |
toString() |
ExecutionResultImpl |
transform(java.util.function.Consumer<ExecutionResultImpl.Builder> builderConsumer) |
public ExecutionResultImpl(GraphQLError error)
public ExecutionResultImpl(java.util.List<? extends GraphQLError> errors)
public ExecutionResultImpl(java.lang.Object data, java.util.List<? extends GraphQLError> errors)
public ExecutionResultImpl(java.lang.Object data, java.util.List<? extends GraphQLError> errors, java.util.Map<java.lang.Object,java.lang.Object> extensions)
public boolean isDataPresent()
public <T> T getData()
getData
in interface ExecutionResult
T
- allows type coercionpublic java.util.List<GraphQLError> getErrors()
getErrors
in interface ExecutionResult
public java.util.Map<java.lang.Object,java.lang.Object> getExtensions()
getExtensions
in interface ExecutionResult
public java.util.Map<java.lang.String,java.lang.Object> toSpecification()
ExecutionResult
ExecutionResult
to spec, so this method
is provided to produce a map that strictly follows the specification.
See : http://facebook.github.io/graphql/#sec-Response-FormattoSpecification
in interface ExecutionResult
public java.lang.String toString()
toString
in class java.lang.Object
public ExecutionResultImpl transform(java.util.function.Consumer<ExecutionResultImpl.Builder> builderConsumer)
public static ExecutionResultImpl.Builder newExecutionResult()