Incorrect filtration on collection products with inContext directive

Topic summary

A developer is experiencing issues with Shopify’s GraphQL API when using the @inContext directive to display localized prices across multiple markets.

Core Problems:

  • Product filtering works correctly for the primary US market
  • When querying with a different market’s country code (e.g., Australia), product filters stop working entirely and return unfiltered results
  • Price filters are not returned in the filters field when the @inContext directive is applied

Technical Details:

  • The query uses @inContext(country: $countryCode) to localize currency codes and prices
  • Filters are passed via the $filters parameter to the collection products query
  • The issue affects the ability to filter products by price range when working with non-primary markets

Current Status:
The discussion remains open with no resolution. A second user has confirmed experiencing the same issue, suggesting this may be a broader problem with Shopify’s API behavior when combining market context with product filtering.

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

Hello, im trying to use shopify api with several markets. For display localized currencyCode`s and prices i use inContext directive with country parameter. For primary US market filtration works correctly, but when i send query with another market my filtration stops working and return me results without filtration

Also how to get filters field with price, if i add inContext directive price filter is not returning

Query example:

query Products(
    $reverse: Boolean
    $sortKey: ProductCollectionSortKeys
    $filters: [ProductFilter!]
    $countryCode: CountryCode
  ) @inContext(country: $countryCode) {
    collection(handle: "all-products") {
      products(first: 10, reverse: $reverse, sortKey: $sortKey, filters: $filters) {
        nodes {
          variants(first: 1) {
            nodes {
              ...ShopifySetData
            }
          }
        }
      }
    }
  }
    
  fragment ShopifySetData on ProductVariant {
    sku
    price {
      ...ShopifyMoneyV2
    }
  }
  
    
  fragment ShopifyMoneyV2 on MoneyV2 {
    amountV2: amount
    currencyCode
  }

Parameters example:

{
  "countryCode": "UA",
  "filters": {
    "price": {
      "min": 0,
      "max": 500
    }
  }
}

Result

{
  "data": {
    "collection": {
      "products": {
        "nodes": [
          {
            "variants": {
              "nodes": [
                {
                  "sku": "20101",
                  "price": {
                    "amountV2": "113643.0",
                    "currencyCode": "UAH"
                  }
                }
              ]
            }
          },
          {
            "variants": {
              "nodes": [
                {
                  "sku": "20104",
                  "price": {
                    "amountV2": "7835.0",
                    "currencyCode": "UAH"
                  }
                }
              ]
            }
          }
        ]
      }
    }
  },
  "extensions": {
    "context": {
      "country": "UA",
      "language": "EN"
    }
  }
}

Hello, did you fix this issue? I am facing the same.