hasura-nhost-filter
Nhost with Hasura. contains filter is converting to _like filter
9 Replies
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โข3y 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:""}}}"?
fascinating-indigoโข3y ago
You can use dot notation in your field value like
question_grades.grade_id
extended-salmonโข3y 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',
},
fascinating-indigoโข3y 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โข3y ago
Sure. Thank you
"@pankod/refine-core": "^3.18.0",
fascinating-indigoโข3y 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โข3y ago
Sure..๐
It worked....Thank you so much
๐