diff --git a/.changeset/modern-rings-taste.md b/.changeset/modern-rings-taste.md new file mode 100644 index 000000000000..534fee10cd2b --- /dev/null +++ b/.changeset/modern-rings-taste.md @@ -0,0 +1,7 @@ +--- +"@refinedev/hasura": patch +--- + +fix: [`hasuraFilters`](https://github.com/refinedev/refine/blob/master/packages/hasura/src/utils/generateFilters.ts) object type. + +All fields in the [`CrudOperators`](https://github.com/refinedev/refine/blob/master/packages/core/src/contexts/data/types.ts#L218) interface must be used in the [`hasuraFilters`](https://github.com/refinedev/refine/blob/master/packages/hasura/src/utils/generateFilters.ts) object type, but some fields may not be supported by Hasura. To resolve this, the object type has been changed to partial. diff --git a/packages/hasura/src/utils/generateFilters.ts b/packages/hasura/src/utils/generateFilters.ts index 865df2281e2b..b0122c63f02c 100644 --- a/packages/hasura/src/utils/generateFilters.ts +++ b/packages/hasura/src/utils/generateFilters.ts @@ -47,9 +47,8 @@ export type HasuraCrudFilter = HasuraLogicalFilter | HasuraConditionalFilter; export type HasuraCrudFilters = HasuraCrudFilter[]; -const hasuraFilters: Record< - HasuraCrudOperators, - HasuraFilterCondition | undefined +const hasuraFilters: Partial< + Record > = { eq: "_eq", ne: "_neq",