Error

class Error(message: String, locations: List<Error.Location>?, path: List<Any>?, extensions: Map<String, Any?>?, 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

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

Types

Location
Link copied to clipboard
common
class Location(line: Int, column: Int)
Represents the location of the error in the GraphQL operation sent to the server.

Functions

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

Properties

customAttributes
Link copied to clipboard
common
val customAttributes: Map<String, Any?>
Custom attributes associated with this error
extensions
Link copied to clipboard
common
val extensions: Map<String, Any?>?
Extensions if any.
locations
Link copied to clipboard
common
val locations: List<Error.Location>?
Locations of the errors in the GraphQL operation It may be null if the location cannot be determined
message
Link copied to clipboard
common
val message: String
Server error message
nonStandardFields
Link copied to clipboard
common
val nonStandardFields: Map<String, Any?>?
Other non-standard fields (discouraged but allowed in the spec), if any.
path
Link copied to clipboard
common
val path: List<Any>?
If this error comes from a field, the path of the field where the error happened.