yang
yang copied to clipboard
Set sort order
The documentation does not say how to set sort order (ascending or descending). I tried something like this but it does not work:
->setJsonApiSort([
'install' => [
'path' => 'field_active_installs_total',
'direction' => 'DESC',
],
])
My bad, I just saw in the specification that prepending - reverses the order:
->setJsonApiSort(['-field_active_installs_total'])
Maybe this could be mentioned in the documentation?