Storefront Graphql Sort Key Title not working

We are having an issue with our product display order is currently not working correctly.

query ProductPricing @inContext(country: SG) {
  products (
    first: 250
    sortKey: TITLE
    query: "product_type:jackets tag:display"
  ) {
    edges {
      cursor
      node {
        title
      }
    }
    pageInfo {
      hasNextPage
    }
  }
}

results:

As you can see – we order our products using a very simple {number}-{title} naming.
I believe the sorting doesn’t seem to be working currently.

Thanks for the report here. I’m also seeing some oddities with sorting. If my testing is correct it looks like it might only fail when also using the query field. Would you mind testing that, too?

Also please let us know which version of the Storefront API you’re targeting.

A little update here: we’ve identified the issue will start looking at a fix. Thanks again for the report!

1 Like

Hi!, yes it seems to fail only when query field is applied.

We have a strange situation, but it is failing with both 2021-10 and 2026-01

We depend on sorting (to work as intended) and queries (for filtering) so currently many down stream features are broken :frowning:

I’m not sure if you guys did anything but now the sortKey + query returns zero items. @Gray-Shopify, its breaking our website completely

query alone works, sortKey alone works. both :cross_mark: