unwilling-turquoise
unwilling-turquoiseโ€ข2y ago

hasura-nhost-filter

Nhost with Hasura. contains filter is converting to _like filter
9 Replies
Omer
Omerโ€ข2y ago
Hey @Shyamili @aliemirs ๐Ÿ‘‹ , hmm i think the problem is here https://github.com/pankod/refine/blob/next/packages/nhost/src/dataProvider/index.ts#L64
GitHub
refine/index.ts at next ยท pankod/refine
Build your React-based CRUD applications, without constraints. - refine/index.ts at next ยท pankod/refine
extended-salmon
extended-salmonโ€ข2y ago
Thanks for the reply. This is the exact issue I am facing. I have a json fileld , but I can't filter with contains. Is there any solution? or how we can filter with nested fields like this "where:{question_grades:{grade_id:{_eq:""}}}"?
sensitive-blue
sensitive-blueโ€ข2y ago
You can use dot notation in your field value like question_grades.grade_id
extended-salmon
extended-salmonโ€ข2y ago
Not working { "question_grades.grade_id": { "_eq": "763d0c3d-aabd-4fe3-91b1-8579b3949cdd" } } this is the gql convertion in network my code is { field: 'question_grades.grade_id', operator: 'eq', value: '763d0c3d-aabd-4fe3-91b1-8579b3949cdd', },
sensitive-blue
sensitive-blueโ€ข2y ago
Can you check your refine-core version? Nested filters are relatively new feature to nhost and hasura Oops, please also check the data provider versions And update to latest please
extended-salmon
extended-salmonโ€ข2y ago
Sure. Thank you "@pankod/refine-core": "^3.18.0",
sensitive-blue
sensitive-blueโ€ข2y ago
It's a bit old version ๐Ÿ˜… Can you try again after updating @pankod/refine-core and your data provider @pankod/refine-nhost to latest? This should resolve the issue, waiting for the good news from you ๐Ÿ™ ๐Ÿ˜…
extended-salmon
extended-salmonโ€ข2y ago
Sure..๐Ÿ‘ It worked....Thank you so much
Omer
Omerโ€ข2y ago
๐Ÿš€