Client-Supplied Custom Sorting Using GraphQL
https://itnext.io/client-supplied-custom-sorting-using-graphql-54e4b87f6011
It’s not uncommon the need to sort data returned from an API, based on arguments sent by the client. With REST we could just use query-strings, but how to do it in GraphQL?
Most databases allow to sort on multiple fields at the same time, and the sorting order can differ from one to another, one way to translate this into GraphQL, and that I’ve been using, is to use enums and object input arguments.