Sorting
Explains how to sort GraphQL query results using single, multiple, and nested `orderBy` criteria.
query {
products (orderBy: [{ name: ASC }]) {
items {
... on Product {
id
name
category
}
}
}
}Multiple Sorting
query {
products (orderBy: [
{ category: ASC }
{ name: ASC }
])
{
items {
... on Product {
id
name
category
}
}
}
}Nested Sorting
Last updated
Was this helpful?