Error

class Error @ApolloDeprecatedSince(version = ApolloDeprecatedSince.Version.v4_0_0) constructor(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
constructor(message: String, locations: List<Error.Location>?, path: List<Any>?, extensions: Map<String, Any?>?, nonStandardFields: Map<String, Any?>?)

Types

Link copied to clipboard
class Builder(val message: String)
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.

Properties

Link copied to clipboard

Extensions if any.

Link copied to clipboard

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

Link copied to clipboard

Server error message

Link copied to clipboard

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.

Functions

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