add MutationDelete
elbow-jason opened this issue · 3 comments
elbow-jason commented
add MutationDelete
and delete/2
for composition of deletes
elbow-jason commented
actually. MutationDelete already exists, but is non-functional. So... fix it.
elbow-jason commented
this blocks #21
elbow-jason commented
working as of commit 3fc657b
Examples:
test "render mutation delete given (%Muation{}, uid, field_name, value)" do
assert mutation()
|> delete(uid("123"), :name, "Jason")
|> render
|> clean_format == clean_format("""
mutation {
delete {
<123> <name> "Jason" .
}
}
""")
end
test "render mutation delete can take wildcards" do
assert mutation()
|> delete("*", :name, "Jason")
|> render
|> clean_format == clean_format("""
mutation {
delete {
* <name> "Jason" .
}
}
""")
end
test "render mutation delete can delete all the edges" do
assert mutation()
|> delete("*", "*", "*")
|> render
|> clean_format == clean_format("""
mutation {
delete {
* * * .
}
}
""")
end