GraphQL Storefront API now supports sorting products within categories
timestamp1621446815712
Storefront API
Enhancement
The GraphQL Storefront API’s now supports sorting the products on a Category node, using the sortBy
parameter. This will match the equivalent sorting behaviors on the BigCommerce Storefront (Stencil).
Consider this query:
query CategoryByUrl {
site {
route(path: "/shop-all") {
node {
__typename
id
... on Category {
name
products(first: 20, sortBy: DEFAULT) {
# Use sortBy parameter to use any of the available storefront sorts
edges {
node {
name
defaultImage {
url(width: 360)
}
}
}
}
}
}
}
}
}
Did you like this update?
{error_message}
Leave your name and email so that we can reply to you (both fields are optional):
Thanks for your feedback!