Somewhat incomplete fix, proper fix would require a lot of rewrite.
issue: gql cannot search for property != bool
, because null bool values exist in the pod
example:
Filter i want to write is
filter {isMock: {ne: 1}}
Results in SQL:
WHERE isMock != 1
This fails, because we're comparing to NULL.
Quick fix, rewrite the query to search for isMock = 0 OR isMock is NULL
. However:
query {
Message (filter: isMock: {eq: null}}) {
isMock
}
}
gets converted to sql:
...
WHERE isMock = null
Also fails, we want to search for is NULL
This fix changes =
to is
in sql query if null
filter value.
Now to actually search for isMock != 1
:
query {
Message (filter: {or: [{isMock: {eq: null}}, {isMock: {eq: 0}}]}) {
isMock
}
}