hasura / ra-data-hasura

react-admin data provider for Hasura GraphQL Engine
MIT License
336 stars 70 forks source link

react-admin's useUnique gets _ilike when it should be _eq #161

Open ceracera opened 1 year ago

ceracera commented 1 year ago

When using useUnique to check if there is already a record with that field name, react-admin sends getList query with exact match.

ra-data-hasura transforms string filters on LIST to always be { _ilike: %value% }, so there is no way to check if there is unique record since it should be {_eq: value}.

Tried to fix this but couldn't use local version of ra-data-hasura probably because there is no lib folder in build, only dist.

How should ra-data-hasura package be used for local testing and development/contributing?