The StringHashFilter of update mutations has unexpected behaviour when eq
is set to a value and in
is set to null
:
schema:
type Foo {
id: String! @id
value: Int!
}
Add two (or more) foos:
mutation {
addFoo(input: [
{
id: "1"
value: 1
}
{
id: "2"
value: 2
}
]) {
foo {
id
value
}
}
}
Update one of them:
mutation {
updateFoo(input: {
filter: {
id: {eq: "1" in: null}
}
set: {
value: 1
}
}) {
foo {
id
}
}
}
Sometimes all foos are updated, sometimes only the expected object.
When I also set the in
filter option, everything works. But this is obviously not expected behaviour.
mutation {
updateFoo(input: {
filter: {
id: {eq: "1" in: ["1"]}
}
set: {
value: 1
}
}) {
foo {
id
}
}
}
Using 20.11.