Package io.smallrye.graphql.client
Interface GraphQLError
public interface GraphQLError
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringThe general type of failuredefault StringgetCode()A stable error codedefault StringA human-readable description of the failuredefault StringThe name of the exception thrown in the service.Contents of the `extensions` field.List of locations in the request that correspond to this error.Textual description of the error, supplied by the service.Any other fields beyond message, locations, path and extensions.Object[]getPath()The path to the response field where the error arose.default StringThe path within the GraphQL query that was rejecteddefault StringgetStringExtension(String name) Contents of one of the `extensions` fields, converted to a String.default StringThe type of mistake leading to the rejection of the GraphQL query
-
Method Details
-
getMessage
String getMessage()Textual description of the error, supplied by the service. -
getLocations
List of locations in the request that correspond to this error. Each location is a map that should contain the `line` and `column` items. -
getPath
Object[] getPath()The path to the response field where the error arose. This is represented as an array, where each item is either a string (when it represents a field), or an integer (when it represents an index). -
getExtensions
Contents of the `extensions` field. This is used by GraphQL services to pass extra information about the error. -
getOtherFields
Any other fields beyond message, locations, path and extensions. These are discouraged by the spec, but if a GraphQL service adds them, they will appear in this map. -
getStringExtension
Contents of one of the `extensions` fields, converted to a String. This is used by GraphQL services to pass extra information about the error. -
getException
The name of the exception thrown in the service. This may not be stable, so it's generally better to use thegetCode() -
getClassification
The general type of failure -
getCode
A stable error code -
getDescription
A human-readable description of the failure -
getValidationErrorType
The type of mistake leading to the rejection of the GraphQL query -
getQueryPath
The path within the GraphQL query that was rejected
-