Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

compareAt price is null when using inContext argument

compareAt price is null when using inContext argument

katy4
Shopify Partner
4 0 4

I'm unable to get the compareAt price for products when using the buyer identity as the inContext argument using the Storefront API. 

This returns a value for compareAtPrice.amount:

 

query Products {
  products(first: 5) {
    nodes {
      variants(first: 5) {
        nodes {
          compareAtPrice {
            amount
            currencyCode
          }
        }
      }
    }
  }
}

 

 

 

 


This returns null for compareAtPrice.amount (for the same product):

query Products($buyer: BuyerInput) @inContext(buyer: $buyer) {
  products(first: 5) {
    nodes {
      variants(first: 5) {
        nodes {
          id
          compareAtPrice {
            amount
currencyCode } } } } } }

 

 

Replies 0 (0)