Packages

Wormwood is a tiny library to aid in testing GraphQL queries against an Absinthe schema. It allows you to test your query documents inside ExUnit test modules, and requires no HTTP requests to occur during testing.

Current section

Files

Jump to
wormwood lib errors parse_error.ex
Raw

lib/errors/parse_error.ex

defmodule WormwoodParseError do
@moduledoc """
An exception that is raised when Wormwood gets a bad result from Absinthe's Parse phase.
It should provide some useful information as to where the error lays in the document.
"""
defexception [:path, :err, :line]
def message(exception) do
"Absinthe couldn't parse the document at path #{exception.path} due to:
#{exception.err}
At Line: #{exception.line}
(Be sure to check imported documents as well!)"
end
end