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 setup_error.ex
Raw

lib/errors/setup_error.ex

defmodule WormwoodSetupError do
@moduledoc """
An exception that is raised when Wormwood is called improperly
"""
defexception [:reason]
def message(exception) do
case exception.reason do
:double_declaration ->
"You cannot declare two 'load_gql' statements in the same module."
:missing_declaration ->
"No GQL document was registered on this module, please check the docs on using the `load_gql`"
end
end
end