Grephql.Error (Grephql v0.10.1)

Copy Markdown View Source

Represents a GraphQL error from the response.

Follows the GraphQL spec error format with message, locations, path, and extensions fields. Use from_json/1 to parse from a raw response error map.

Summary

Types

location()

@type location() :: %{line: non_neg_integer(), column: non_neg_integer()}

t()

@type t() :: %Grephql.Error{
  extensions: map() | nil,
  locations: [map()] | nil,
  message: String.t(),
  path: [Grephql.Types.PathSegment.t()] | nil
}

Functions

from_json(json)

@spec from_json(map()) :: t()