PostGraphile version: 4.4.1
CLI: postgraphile --4.3.3
Steps to reproduce:
npx postgraphile -c postgres://postgres:postgres@localhost:5432/sampledb -a -j --append-plugins postgraphile-plugin-connection-filter --cors --enhance-graphiql --export-schema-graphql path\schema.graphql
I need to run a query on graphql in which query filter may contain more than one value.
For example:
{
first: allBiometricAttendenceTable3S(filter: {ecode: {notEqualTo: ["p-01", "p-02"]}}) {
nodes {
sno
ecode
schoolName
}
}
}
Current behavior:
error: Expected type String, found [\"p-01\", \"p-02\"].
Expected behavior:
Should return the values corresponding to the filter options _(In this case, all values other than "p-01" and "p-02")_
Can anyone help?
See https://github.com/graphile-contrib/postgraphile-plugin-connection-filter#operators
I believe the notIn operator should be used here.
Correct 👍
[semi-automated message] Thanks for your question; hopefully we're well on the way to helping you solve your issue. This doesn't currently seem to be a bug in the library so I'm going to close the issue, but please feel free to keep requesting help below and if it does turn out to be a bug we can definitely re-open it 👍
You can also ask for help in the #help-and-support channel in our Discord chat.
Most helpful comment
See https://github.com/graphile-contrib/postgraphile-plugin-connection-filter#operators
I believe the
notInoperator should be used here.