codeledge / ra-tools

React Admin Tools, namely the Prisma Data Adapter
66 stars 19 forks source link

Update logic to also account for prisma enums #51

Closed sicarius97 closed 1 year ago

sicarius97 commented 1 year ago

Prisma enums cannot use contain, even though when filtering they look like strings. As such we have to treat them different and use equals, so I propose adding an enum operator to differentiate when filtering by an enum column. Currently if you try to filter by an enum column at all, the query will just error out

ogroppo commented 1 year ago

Good shout, merging now and will publish soon

ogroppo commented 1 year ago

Give it go and let us know 👌

sicarius97 commented 1 year ago

@ogroppo Works like a charm, thanks for getting this in so fast