Package com.commercetools.graphql.api
Interface GraphQLDataResponse
public interface GraphQLDataResponse
GraphQLResponse
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
GraphQLDataResponse graphQLResponse = GraphQLDataResponse.builder()
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic GraphQLDataResponseBuilder
builder()
builder factory method for GraphQLResponsestatic GraphQLDataResponseBuilder
builder
(GraphQLDataResponse template) create builder for GraphQLResponse instancestatic GraphQLDataResponse
deepCopy
(GraphQLDataResponse template) factory method to create a deep copy of GraphQLResponsegetData()
default <T> T
getData
(GraphQLRequest<T> request) @Valid List<GraphQLError>
static GraphQLDataResponse
of()
factory methodstatic GraphQLDataResponse
of
(GraphQLDataResponse template) factory method to create a shallow copy GraphQLResponsevoid
setData
(GraphQLData data) set datavoid
setErrors
(GraphQLError... errors) set errorsvoid
setErrors
(List<GraphQLError> errors) set errorsstatic com.fasterxml.jackson.core.type.TypeReference<GraphQLDataResponse>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withGraphQLDataResponse
(Function<GraphQLDataResponse, T> helper) accessor map function
-
Method Details
-
getData
GraphQLData getData()- Returns:
- data
-
getErrors
- Returns:
- errors
-
setData
set data- Parameters:
data
- value to be set
-
setErrors
set errors- Parameters:
errors
- values to be set
-
setErrors
set errors- Parameters:
errors
- values to be set
-
getData
-
of
factory method- Returns:
- instance of GraphQLResponse
-
of
factory method to create a shallow copy GraphQLResponse- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of GraphQLResponse- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for GraphQLResponse- Returns:
- builder
-
builder
create builder for GraphQLResponse instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withGraphQLDataResponse
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-