Skip to content

Allow orderBy with nested attributes #458

@cimchd

Description

@cimchd

I want to order a table by a nested attribute. I tried something like this:

query {
  posts (orderBy: { author: { name : desc } } ) {
    content
    author {
      name
    }
  }
}

But the result was that author is not available there. I checked the generated oderby-input-type and there were only the scalar attributes of the post model available, the related models are missing.

Is it possible to extend the generated input types ...OrderByInput to include the related models?

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs/upstreamAn upstream component needs to be updated firsttype/featAdd a new capability or enhance an existing one

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions