refinedev / refine

A React Framework for building internal tools, admin panels, dashboards & B2B apps with unmatched flexibility.
https://refine.dev
MIT License
25.95k stars 1.96k forks source link

[BUG] Some filter operators are not implemented in the Nestjs-Query Data Provider #6008

Closed yamadayutaka closed 4 weeks ago

yamadayutaka commented 4 weeks ago

Describe the bug

The following filter operators are not implemented in the Nestjs-Query Data Provider.

Steps To Reproduce

  1. create Nestjs-Query example project.
pnpm create refine-app@latest --example data-provider-nestjs-query
  1. implement initial filter with containss operator on src/pages/categories/list.tsx.
  const { tableProps, sorters } = useTable<ICategory>({
    initialSorter: [
      {
        field: "id",
        order: "asc",
      },
    ],
    initialFilter: [
      {
        field: "title",
        operator: "containss",
        value: "Refine",
      },
    ],
  1. run refine app.
pnpm dev
  1. navigate Categories menu.

  2. following error occurred.

Variable "$filter" got invalid value { undefined: "Refine" } at "filter.title";

Expected behavior

GraphQL query is executed with the following filter.

filter: {title: {like: "%Refine%"}}

Packages

Additional Context

I have already fixed this issue and will create a PR.

BatuhanW commented 4 weeks ago

Hey @yamadayutaka thanks for the issue and looking forward to your PR! Make sure to check our Contributing Guide before sending the PR.

yamadayutaka commented 4 weeks ago

Hi @BatuhanW, Thanks for merging my PR!