Skip to content

Sorting by child entities #3737

@azf20

Description

@azf20

#2960 implemented filtering on the basis of child entities. This introduces sorting on the same entities.

There are some constraints:

  • Sorting should only apply for 1:1 child entities
  • Sorting should only apply to single fields on those child entities
  • This should only be available one level deep

i.e. on the following:

type Country @entity {
  id: ID!
  capital: City!
  cities: [City!]!
}

type City @entity {
  id: ID!
  name: String
  population: Int
  landmarks: [String!]!
}

You should be able to sort Countries by data on the capital entity, but not on the cities. And on the capital, you should be able to sort on the basis of the name and population, but not by the landmarks.

The above should still work with derived 1:1 child entities & fields, and interfaces.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions