hasura / ra-data-hasura

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

Like filter for non-String type (citext, for ex.) doesn't use constructed pattern #95

Open daa opened 2 years ago

daa commented 2 years ago

When field being search is not of String type but similar (citext, for example) it's desirable to use _ilike filter but the code constructing filter doesn't use constructed pattern in this case - it uses just value: https://github.com/hasura/ra-data-hasura/blob/b0f8cabdf2a0a79db7056b049128d0e7c01899de/src/buildVariables/buildGetListVariables.ts#L90-L109

So when I set up filter using TextInput with source=field@_like for citext column actual search is performed by value but not %value%.