GraphQLError

data class GraphQLError(val message: String, val path: List<Any>? = null, val locations: List<SourceLocation>? = null, val extensions: Map<String, Any?> = emptyMap())(source)

Viaduct's representation of a GraphQL error.

This type is provided by Viaduct to service engineers for building custom error responses.

Constructors

Link copied to clipboard
constructor(message: String, path: List<Any>? = null, locations: List<SourceLocation>? = null, extensions: Map<String, Any?> = emptyMap())

Properties

Link copied to clipboard

Additional error metadata (e.g., "localizedMessage", custom fields).

Link copied to clipboard
val locations: List<SourceLocation>? = null

Source locations in the GraphQL query where the field was requested.

Link copied to clipboard

The error message to display to clients.

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

The execution path where the error occurred (e.g., "user", "profile", "name").