这是indexloc提供的服务,不要输入任何密码
Skip to content

Define lookup_fields on Object Relationships to enable sorting / filtering on related fields #459

@jrhicks

Description

@jrhicks

Analogous to aggregate_fields that you plan to allow developers to define on "array_relationships" .... you might consider providing lookup_fields on "object_relationships".

Lookup fields add the ability to sort and filter on related fields. For example, without lookup_fields the following order_by isn't valid:

{
  work_orders(order_by: contractor_name_asc)  {
    id
    work_order_no
    contractor {
      name
    }
  }
}

End users have a strong expectation when being displayed a data grid / table to be able to click any table header and sort.

After allowing the developer to create a lookup columns "contractor_name" that points to the contractor's name ... the following would be valid:

{
  work_orders(order_by: contractor_name_asc)  {
    id
    work_order_no
    contractor_name
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions