You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If in any comparision expression a null (or undefined) value is passed, the expression currently gets reduced to {}
I have such quiery:
query Items($itemId: Int) {
item(where: {id: {_lt: $itemId}}) {
id
name
}
}
Querry value {itemId: null} or undefined.
I expect that where will be evaluated to the where: {} as described in the documentation. Instead, I have an error expected a 32-bit integer for type "Int", but found null.
This bug appears with v1.3.4-beta.2 for me. On stable, it worked as expected.
Sorry about this! But this was actually causing serious problems for mutations where {} to true was deleting all the rows in the table. Also, the overall behaviour seemed opposite of expectation since passing null into a variable would hardly mean "everything" but variables accidentally becoming undefined was quite common.
We will highlight this in the changelog and make proper notifications before hitting stable. Thanks for the feedback.
According to the documentation:
I have such quiery:
Querry value
{itemId: null}
orundefined
.I expect that
where
will be evaluated to thewhere: {}
as described in the documentation. Instead, I have an error expected a 32-bit integer for type "Int", but found null.This bug appears with v1.3.4-beta.2 for me. On stable, it worked as expected.
Possible related to #6459
The text was updated successfully, but these errors were encountered: