Products are not sorted by title after translation in GraphQL API

Topic summary

A developer is experiencing a sorting issue with Shopify’s GraphQL API where products are not being sorted by their translated titles, only by the original language titles.

Technical Details:

  • Using ProductCollectionSortKeys with sortKey parameter in the query
  • Fetching products from a collection with filters applied (tag: “course”)
  • Query includes pagination, variants, featured images, and collection data
  • Headers include “Accept-Language” for localization

Current Problem:
Despite setting the language header, the API returns products sorted by the original title rather than the translated version, suggesting the sort operation occurs before translation is applied.

Status: The issue remains unresolved with no responses or solutions provided yet. This appears to be a potential limitation in how Shopify’s GraphQL API handles sorting with translated content.

Summarized with AI on November 3. AI used: claude-sonnet-4-5-20250929.

When I use the GraphQL API to return the products, they are not sorted by title after translation, they are only sorted in the original language.

My code:

query GetProducts(
      $cursor: String
      $collectionHandle: String!
      $sortKey: ProductCollectionSortKeys
      $reverse: Boolean
    ) {
      collectionByHandle(handle: $collectionHandle) {
        id
        title
        products(
          first: 10
          after: $cursor
          sortKey: $sortKey
          reverse: $reverse
          filters: { tag: "course"}
        ) {
          edges {
            node {
              id
              title
              vendor
              onlineStoreUrl
              tags
              description
              collections(first: 5) {
                edges {
                  node {
                    id
                    title
                    handle
                  }
                }
              }
              createdAt
              featuredImage {
                url
                altText
              }
              variants(first: 50) {
                edges {
                  node {
                    title
                    selectedOptions {
                      name
                      value
                    }
                    price {
                      amount
                      currencyCode
                    }
                  }
                }
              }
            }
          }
          pageInfo {
            hasNextPage
            endCursor
          }
        }
      }
    }

My headers:

“Accept-Language”: “en”