Current section
Files
Jump to
Current section
Files
lib/graphql_ws_client/query_error.ex
defmodule GraphQLWSClient.QueryError do
@moduledoc """
Exception that contains errors from a GraphQL query.
"""
defexception errors: []
@type t :: %__MODULE__{errors: [any]}
def message(%__MODULE__{} = exception) do
"GraphQL query error:\n\n" <> inspect(exception.errors, pretty: true)
end
end