compareAt price is null when using inContext argument

katy4
Visitor
1 0 0

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)