Interface GraphQLError.Builder<B extends GraphQLError.Builder<B>>
- All Known Implementing Classes:
GraphqlErrorBuilder
- Enclosing interface:
GraphQLError
@NullUnmarked
public static interface GraphQLError.Builder<B extends GraphQLError.Builder<B>>
A builder of
GraphQLErrors-
Method Summary
Modifier and TypeMethodDescriptionbuild()errorType(ErrorClassification errorType) Sets theErrorClassificationof the messageextensions(Map<String, Object> extensions) Sets the extensions of the messagelocation(SourceLocation location) This adds a location to the errorlocations(List<SourceLocation> locations) This adds locations to the errorSets the message of the error usingString.format(String, Object...)with the argumentspath(ResultPath path) Sets the path of the messageSets the path of the message
-
Method Details
-
message
Sets the message of the error usingString.format(String, Object...)with the arguments- Parameters:
message- the messageformatArgs- the arguments to use- Returns:
- this builder
-
locations
This adds locations to the error- Parameters:
locations- the locations to add- Returns:
- this builder
-
location
This adds a location to the error- Parameters:
location- the locations to add- Returns:
- this builder
-
path
Sets the path of the message- Parameters:
path- can be null- Returns:
- this builder
-
path
-
errorType
Sets theErrorClassificationof the message- Parameters:
errorType- the error classification to use- Returns:
- this builder
-
extensions
-
build
GraphQLError build()- Returns:
- a newly built GraphqlError
-