refine icon indicating copy to clipboard operation
refine copied to clipboard

[BUG] Nested CrudFilters with Supabase not correctly mapped

Open jsbrain opened this issue 1 year ago • 0 comments

Describe the bug

Queries nested in or filters are not mapped to the respective type with the Supabase dataProvider.

Consider the following filter:

const filter: CrudFilter = {
  operator: 'or',
  value: [
    {
      field: 'name',
      operator: 'contains',
      value: 'test',
    },
  ],
};

which should resolve resolve to (name.ilike.test) but does resolve to (name.contains.test) resulting in

{
    "code": "PGRST100",
    "details": "unknown single value operator contains",
    "hint": null,
    "message": "\"failed to parse logic tree ((name.contains.test))\" (line 1, column 18)"
}

Steps To Reproduce

See above.

Expected behavior

See above.

Screenshot

No response

Desktop

No response

Mobile

No response

Additional Context

No response

jsbrain avatar Jan 24 '23 09:01 jsbrain