getCatalogData
query supports customizable sorting to help control the order in which catalog items are returned. This is particularly useful when users need to view trainings by title, date, or duration.
Sorting is configured using two arguments: sortKey
and reverse
.
Sorting can be combined with pagination and filtering arguments to further refine the results.
Sorting Arguments
Argument | Type | Description |
---|---|---|
sortKey | CatalogSortKeys | Specifies the field to sort by. See available options below. |
reverse | Boolean | If true , reverses the sort order (e.g., from ascending to descending). Default is false . |
By default, sorting is performed in **ascending **order. Use
reverse: true
to sort in descending order.**Available **sortKey
Values
Sort Key | Description | Underlying Field |
---|---|---|
TITLE | Sorts trainings alphabetically by title | Training title |
DURATION | Sorts by the training’s duration label | Duration taxonomy label |
PUBLISHED | Sorts by publication date | Entity publication timestamp |