Skip to content

[Data Connect] Support passing Filter and Order types as top-level variables #9752

@AKsFabs

Description

@AKsFabs

Feature Description

Currently, the Data Connect compiler blocks the use of auto-generated Filter and Order types (e.g., Product_Filter, Product_Order) as top-level GraphQL variables.

When attempting to use them in a generic list query, the compiler throws:
On $where: does not support Product_Filter as an input variable

Use Case

I am building a dashboard with React-Admin, which relies on dynamic filtering and sorting. To keep my dataProvider clean and "DRY", I need to be able to pass a structured filter object from the client directly to the query.

Example Query:

query ListProducts(
  $where: Product_Filter, 
  $orderBy: [Product_Order!],
  $limit: Int,
  $offset: Int
) {
  data: products(where: $where, orderBy: $orderBy, limit: $limit, offset: $offset) {
    id
    name
  }
  total: products_aggregate(where: $where) {
    count
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions