silverstripe / silverstripe-graphql

Serves Silverstripe data as GraphQL representations
BSD 3-Clause "New" or "Revised" License
52 stars 61 forks source link

`SortPlugin` only sorts based on the last field in the sort array, rather than cascading sort based on all sort fields. #542

Closed GuySartorelli closed 1 year ago

GuySartorelli commented 1 year ago

GraphQL's SortPlugin only uses the last field in the sort array, rather than sorting based on all sort fields.

This is because in framework DataList each call to ->sort() actually resets previous sorts made, and the result is that only the end sort happens.

PR

GuySartorelli commented 1 year ago

Merged and tagged as 4.3.2. It'll be tagged for the 5.x branch once it has been merged up.