Package graphql
Interface GraphQLError.Builder<B extends GraphQLError.Builder<B>>
-
- All Known Implementing Classes:
GraphqlErrorBuilder
- Enclosing interface:
- GraphQLError
public static interface GraphQLError.Builder<B extends GraphQLError.Builder<B>>A builder ofGraphQLErrors
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GraphQLErrorbuild()BerrorType(ErrorClassification errorType)Sets theErrorClassificationof the messageBextensions(@Nullable java.util.Map<java.lang.String,java.lang.Object> extensions)Sets the extensions of the messageBlocation(@Nullable SourceLocation location)This adds a location to the errorBlocations(@Nullable java.util.List<SourceLocation> locations)This adds locations to the errorBmessage(java.lang.String message, java.lang.Object... formatArgs)Sets the message of the error usingString.format(String, Object...)with the argumentsBpath(@Nullable ResultPath path)Sets the path of the messageBpath(@Nullable java.util.List<java.lang.Object> path)Sets the path of the message
-
-
-
Method Detail
-
message
B message(java.lang.String message, java.lang.Object... formatArgs)
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
B locations(@Nullable @Nullable java.util.List<SourceLocation> locations)
This adds locations to the error- Parameters:
locations- the locations to add- Returns:
- this builder
-
location
B location(@Nullable @Nullable SourceLocation location)
This adds a location to the error- Parameters:
location- the locations to add- Returns:
- this builder
-
path
B path(@Nullable @Nullable ResultPath path)
Sets the path of the message- Parameters:
path- can be null- Returns:
- this builder
-
path
B path(@Nullable @Nullable java.util.List<java.lang.Object> path)
Sets the path of the message- Parameters:
path- can be null- Returns:
- this builder
-
errorType
B errorType(ErrorClassification errorType)
Sets theErrorClassificationof the message- Parameters:
errorType- the error classification to use- Returns:
- this builder
-
extensions
B extensions(@Nullable @Nullable java.util.Map<java.lang.String,java.lang.Object> extensions)
Sets the extensions of the message- Parameters:
extensions- the extensions to use- Returns:
- this builder
-
build
GraphQLError build()
- Returns:
- a newly built GraphqlError
-
-