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
}
}
}
}
}
}