Error

class Error(    val message: String,     val locations: List<Error.Location>?,     val path: List<Any>?,     val extensions: Map<String, Any?>?,     val nonStandardFields: Map<String, Any?>?)

Represents an error response returned from the GraphQL server See https://spec.graphql.org/draft/#sec-Errors.Error-result-format

Constructors

Link copied to clipboard
fun Error(    message: String,     locations: List<Error.Location>?,     path: List<Any>?,     extensions: Map<String, Any?>?,     nonStandardFields: Map<String, Any?>?)

Types

Link copied to clipboard
class Location(val line: Int, val column: Int)

Represents the location of the error in the GraphQL operation sent to the server. This location is represented in terms of the line and column number.

Functions

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard

Custom attributes associated with this error

Link copied to clipboard
val extensions: Map<String, Any?>?

Extensions if any.

Link copied to clipboard
val locations: List<Error.Location>?

Locations of the errors in the GraphQL operation It may be null if the location cannot be determined

Link copied to clipboard
val message: String

Server error message

Link copied to clipboard
val nonStandardFields: Map<String, Any?>?

Other non-standard fields (discouraged but allowed in the spec), if any.

Link copied to clipboard
val path: List<Any>?

If this error comes from a field, the path of the field where the error happened. Values in the list can be either Strings or Int Can be null if the error doesn't come from a field, like validation errors.