Interface GraphQLResponse
public interface GraphQLResponse
GraphQLResponse
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
GraphQLResponse graphQLResponse = GraphQLResponse.builder()
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic GraphQLResponseBuilder
builder()
builder factory method for GraphQLResponsestatic GraphQLResponseBuilder
builder
(GraphQLResponse template) create builder for GraphQLResponse instancestatic GraphQLResponse
deepCopy
(GraphQLResponse template) factory method to create a deep copy of GraphQLResponsegetData()
@Valid List<GraphQLError>
static GraphQLResponse
of()
factory methodstatic GraphQLResponse
of
(GraphQLResponse template) factory method to create a shallow copy GraphQLResponsevoid
set datavoid
setErrors
(GraphQLError... errors) set errorsvoid
setErrors
(List<GraphQLError> errors) set errorsstatic com.fasterxml.jackson.core.type.TypeReference<GraphQLResponse>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withGraphQLResponse
(Function<GraphQLResponse, T> helper) accessor map function
-
Method Details
-
getData
Object 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
-
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
-
withGraphQLResponse
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
-