I just wanted to say thanks to @gdub01 for asking about this and the answers that came from it. I am incredibly new to Elixir, GraphQL, and Absinthe and this helped a lot.
I’ve written up what I did in order to test both queries and mutations. Testing Absinthe with ExUnit.
The main difference is that the query param you send needs to look slightly different, these are the two helpers I came up with based on what was shared here before;
def mutation_skeleton(query) do
%{
"operationName" => "",
"query" => "#{query}",
"variables" => ""
}
end
def query_skeleton(query, query_name) do
%{
"operationName" => "#{query_name}",
"query" => "query #{query_name} #{query}",
"variables" => "{}"
}
end






















