T
- The type of the data fetched@PublicApi public class DataFetcherResult<T> extends java.lang.Object
DataFetcher
that contains both data and errors to be relativized and
added to the final result. This is a useful when your ``DataFetcher`` retrieves data from multiple sources
or from another GraphQL resource.Modifier and Type | Class and Description |
---|---|
static class |
DataFetcherResult.Builder<T> |
Constructor and Description |
---|
DataFetcherResult(T data,
java.util.List<GraphQLError> errors) |
Modifier and Type | Method and Description |
---|---|
T |
getData() |
java.util.List<GraphQLError> |
getErrors() |
static <T> DataFetcherResult.Builder<T> |
newResult()
Creates a new data fetcher result builder
|
public DataFetcherResult(T data, java.util.List<GraphQLError> errors)
public T getData()
public java.util.List<GraphQLError> getErrors()
public static <T> DataFetcherResult.Builder<T> newResult()
T
- the type of the result