Package graphql.execution
Class DataFetcherResult.Builder<T>
- java.lang.Object
-
- graphql.execution.DataFetcherResult.Builder<T>
-
- Enclosing class:
- DataFetcherResult<T>
public static class DataFetcherResult.Builder<T> extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataFetcherResult<T>
build()
DataFetcherResult.Builder<T>
clearErrors()
DataFetcherResult.Builder<T>
data(T data)
DataFetcherResult.Builder<T>
error(GraphQLError error)
DataFetcherResult.Builder<T>
errors(java.util.List<GraphQLError> errors)
DataFetcherResult.Builder<T>
extensions(java.util.Map<java.lang.Object,java.lang.Object> extensions)
boolean
hasErrors()
DataFetcherResult.Builder<T>
localContext(java.lang.Object localContext)
-
-
-
Constructor Detail
-
Builder
public Builder(DataFetcherResult<T> existing)
-
Builder
public Builder(T data)
-
Builder
public Builder()
-
-
Method Detail
-
data
public DataFetcherResult.Builder<T> data(T data)
-
errors
public DataFetcherResult.Builder<T> errors(java.util.List<GraphQLError> errors)
-
error
public DataFetcherResult.Builder<T> error(GraphQLError error)
-
clearErrors
public DataFetcherResult.Builder<T> clearErrors()
-
hasErrors
public boolean hasErrors()
- Returns:
- true if there are any errors present
-
localContext
public DataFetcherResult.Builder<T> localContext(java.lang.Object localContext)
-
extensions
public DataFetcherResult.Builder<T> extensions(java.util.Map<java.lang.Object,java.lang.Object> extensions)
-
build
public DataFetcherResult<T> build()
-
-