Open xcv58 opened 6 years ago
Hey there,
Could you please provide the components you're using to end up into this bug?
Thanks 🙏
Sure, the component is react-admin List: https://marmelab.com/react-admin/List.html#permanent-filter
The query like this:
{
posts (where: { title_in: ["Hello World", "My Second Post"] }) {
id
title
}
}
will turn to:
{ title_in: { id_in: ["Hello World", "My Second Post"] } }
The link for the query: https://graphqlbin.com/v2/YvW2uN
@Weakky I reproduce the bug here: https://github.com/xcv58/ra-data-opencrud-issue-21
https://github.com/Weakky/ra-data-opencrud/blob/929e19342f0878fa7ab68852162f48c58a318f1a/src/buildVariables.js#L31-L36
The filter like
{ id_in: ['id_1', 'id_2'] }
will lead to query variables like:Which is not a valid query anymore.