Skip to content

Sorting by populated fields on query endpoints #959

Open
@jeroenboumans

Description

@jeroenboumans

Is it possible to sort on populated fields of a queried response? For example, would this be an option to extend sorting:

POST https://api.spacexdata.com/v4/launches/query

{
  "options": {
    "select": [
      "id",
      "flight_number",
      "name"
    ],
    "sort": {
      "rocket.name": "desc"
    },
    "populate": [
      {
        "path": "rocket",
        "select": [
          "name"
        ]
      }
    ]
  }
}

Not seeing this in the docs as an example, also not in the mongoose docs.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions