Generated API - Sorting
The generated API comes with inbuilt support for sorting.
Sorting uses the
orderBy parameter which accepts an object with the name of the fields.
Amplication does not support sorting by fields of nested entities.
orderByparameter is available only on endpoints and queries that return a list of items. For example:
The following examples get all posts sorted by the
curl -X 'GET' \
-H 'accept: application/json'