Interface GraphQLError
public interface GraphQLError
GraphQLError
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
GraphQLError graphQLError = GraphQLError.builder()
.message("{message}")
.plusLocations(locationsBuilder -> locationsBuilder)
.extensions(extensionsBuilder -> extensionsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic GraphQLErrorBuilder
builder()
builder factory method for GraphQLErrorstatic GraphQLErrorBuilder
builder
(GraphQLError template) create builder for GraphQLError instancestatic GraphQLError
deepCopy
(GraphQLError template) factory method to create a deep copy of GraphQLError@NotNull @Valid GraphQLErrorObject
Represents a single error.@NotNull @Valid List<GraphQLErrorLocation>
@NotNull String
getPath()
static GraphQLError
of()
factory methodstatic GraphQLError
of
(GraphQLError template) factory method to create a shallow copy GraphQLErrorvoid
setExtensions
(GraphQLErrorObject extensions) Represents a single error.void
setLocations
(GraphQLErrorLocation... locations) set locationsvoid
setLocations
(List<GraphQLErrorLocation> locations) set locationsvoid
setMessage
(String message) set messagevoid
set pathvoid
set pathstatic com.fasterxml.jackson.core.type.TypeReference<GraphQLError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withGraphQLError
(Function<GraphQLError, T> helper) accessor map function
-
Method Details
-
getMessage
- Returns:
- message
-
getLocations
- Returns:
- locations
-
getPath
- Returns:
- path
-
getExtensions
Represents a single error.
- Returns:
- extensions
-
setMessage
set message- Parameters:
message
- value to be set
-
setLocations
set locations- Parameters:
locations
- values to be set
-
setLocations
set locations- Parameters:
locations
- values to be set
-
setPath
set path- Parameters:
path
- values to be set
-
setPath
set path- Parameters:
path
- values to be set
-
setExtensions
Represents a single error.
- Parameters:
extensions
- value to be set
-
of
factory method- Returns:
- instance of GraphQLError
-
of
factory method to create a shallow copy GraphQLError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of GraphQLError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for GraphQLError- Returns:
- builder
-
builder
create builder for GraphQLError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withGraphQLError
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
-