Issue with update mutation and alias
michael-forman opened this issue · comments
If I have:
type Foo
{
uuid: ID!
name: String
}
and an existing Foo node with values for both properties.
applying the mutation:
mutation updateFoo($name: String, $uuid: ID!) {
foo: updateFoo(name: $name, uuid: $uuid) { name uuid }
}
with values:
{
"name":"222",
"uuid":"b763dc6a-114d-4f89-b3aa-bf33a5599a64"
}
(where there uuid is the matching one,
the result is a foo object with the uuid removed.
if instead I run the mutation without the alias it works as expected:
mutation updateFoo($name: String, $uuid: ID!) {
updateFoo(name: $name, uuid: $uuid) { name uuid }
}
I was trying to use an alias so that my "CRUD" type pages always got the result back in the same format. Not sure if that's appropriate or not...
(The essentially the same query with the GRANDstack works as expected
mutation updateFoo($name: String, $uuid: ID!) {
foo: UpdateFoo(name: $name, uuid: $uuid) { name uuid }
)
Cheers,
Michael
ah, sorry - I should have realised that was the same issue.