mobilizon.chapril.org-mobil.../test/support/abinthe_helpers.ex

21 lines
413 B
Elixir
Raw Normal View History

defmodule MobilizonWeb.AbsintheHelpers do
@moduledoc """
Absinthe helpers for tests
"""
def query_skeleton(query, query_name) do
%{
"operationName" => "#{query_name}",
"query" => "query #{query_name} #{query}",
"variables" => "{}"
}
end
def mutation_skeleton(query) do
%{
"operationName" => "",
"query" => "#{query}",
"variables" => ""
}
end
end