SpaceX-API icon indicating copy to clipboard operation
SpaceX-API copied to clipboard

Sorting by populated fields on query endpoints

Open jeroenboumans opened this issue 4 years ago • 1 comments

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.

jeroenboumans avatar Nov 18 '21 17:11 jeroenboumans

Unfortunately I don't think this is possible currently

jakewmeyer avatar Nov 20 '21 14:11 jakewmeyer