# `Grephql.Error`
[🔗](https://github.com/fahchen/grephql/blob/v0.10.1/lib/grephql/error.ex#L1)

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.

# `location`

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

# `t`

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

# `from_json`

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
