@PublicApi public interface ErrorClassification
GraphQLError implementations could use
custom classifications.
graphql-java ships with a standard set of error classifications via ErrorType
| Modifier and Type | Method and Description |
|---|---|
static ErrorClassification |
errorClassification(java.lang.String errorClassification)
This produces a simple ErrorClassification that represents the provided String.
|
default java.lang.Object |
toSpecification(GraphQLError error)
This is called to create a representation of the error classification
that can be put into the `extensions` map of the graphql error under the key 'classification'
when
GraphQLError.toSpecification() is called |
default java.lang.Object toSpecification(GraphQLError error)
GraphQLError.toSpecification() is callederror - the error associated with this classificationstatic ErrorClassification errorClassification(java.lang.String errorClassification)
errorClassification - the string that represents the error classification