I have already tried it with two ways(productVariants & priceList).
The price listed in the market catalog is not being searched correctly in the price GraphQL.
As an example, we have given an image of the product, and you can see it.
We have provided GraphQL and images; as you can see, the data is different. As an example, we have highlighted the variant.
query MyQuery {
productVariants(first: 250, query: "product_id:7154589564985") {
nodes {
title
contextualPricing(context: {country: SA}) {
price {
amount
currencyCode
}
compareAtPrice {
amount
currencyCode
}
}
product {
title
}
}
}
}
Output:
{
"data": {
"productVariants": {
"nodes": [
{
"title": "White / X-Small / Rubber",
"contextualPricing": {
"price": {
"amount": "4.0",
"currencyCode": "SAR"
},
"compareAtPrice": null
},
"product": {
"title": "Long Sleeved Tee"
}
},
{
"title": "White / Small / Rubber",
"contextualPricing": {
"price": {
"amount": "5.0",
"currencyCode": "SAR"
},
"compareAtPrice": null
},
"product": {
"title": "Long Sleeved Tee"
}
},
{
"title": "White / Medium / Rubber",
"contextualPricing": {
"price": {
"amount": "4.0",
"currencyCode": "SAR"
},
"compareAtPrice": null
},
"product": {
"title": "Long Sleeved Tee"
}
},
{
"title": "White / Large / Rubber",
"contextualPricing": {
"price": {
"amount": "42.0",
"currencyCode": "SAR"
},
"compareAtPrice": null
},
"product": {
"title": "Long Sleeved Tee"
}
},
{
"title": "Black / X-Small / Rubber",
"contextualPricing": {
"price": {
"amount": "4.0",
"currencyCode": "SAR"
},
"compareAtPrice": null
},
"product": {
"title": "Long Sleeved Tee"
}
},
{
"title": "Black / Small / Rubber",
"contextualPricing": {
"price": {
"amount": "4.0",
"currencyCode": "SAR"
},
"compareAtPrice": null
},
"product": {
"title": "Long Sleeved Tee"
}
},
{
"title": "Black / Medium / Rubber",
"contextualPricing": {
"price": {
"amount": "4.0",
"currencyCode": "SAR"
},
"compareAtPrice": null
},
"product": {
"title": "Long Sleeved Tee"
}
},
{
"title": "Black / Large / Rubber",
"contextualPricing": {
"price": {
"amount": "4.0",
"currencyCode": "SAR"
},
"compareAtPrice": null
},
"product": {
"title": "Long Sleeved Tee"
}
},
{
"title": "Beige / X-Small / Rubber",
"contextualPricing": {
"price": {
"amount": "4.0",
"currencyCode": "SAR"
},
"compareAtPrice": null
},
"product": {
"title": "Long Sleeved Tee"
}
},
{
"title": "Beige / Small / Rubber",
"contextualPricing": {
"price": {
"amount": "4.0",
"currencyCode": "SAR"
},
"compareAtPrice": null
},
"product": {
"title": "Long Sleeved Tee"
}
},
{
"title": "Beige / Medium / Rubber",
"contextualPricing": {
"price": {
"amount": "4.0",
"currencyCode": "SAR"
},
"compareAtPrice": null
},
"product": {
"title": "Long Sleeved Tee"
}
},
{
"title": "Beige / Large / Rubber",
"contextualPricing": {
"price": {
"amount": "1.0",
"currencyCode": "SAR"
},
"compareAtPrice": {
"amount": "42.0",
"currencyCode": "SAR"
}
},
"product": {
"title": "Long Sleeved Tee"
}
},
{
"title": "Beige / Extra Large / Rubber",
"contextualPricing": {
"price": {
"amount": "1.0",
"currencyCode": "SAR"
},
"compareAtPrice": {
"amount": "42.0",
"currencyCode": "SAR"
}
},
"product": {
"title": "Long Sleeved Tee"
}
},
{
"title": "Black / Extra Large / Rubber",
"contextualPricing": {
"price": {
"amount": "4.0",
"currencyCode": "SAR"
},
"compareAtPrice": {
"amount": "0.0",
"currencyCode": "SAR"
}
},
"product": {
"title": "Long Sleeved Tee"
}
},
{
"title": "White / Extra Large / Rubber",
"contextualPricing": {
"price": {
"amount": "42.0",
"currencyCode": "SAR"
},
"compareAtPrice": {
"amount": "0.0",
"currencyCode": "SAR"
}
},
"product": {
"title": "Long Sleeved Tee"
}
}
]
}
},
"extensions": {
"cost": {
"requestedQueryCost": 35,
"actualQueryCost": 5,
"throttleStatus": {
"maximumAvailable": 2000,
"currentlyAvailable": 1995,
"restoreRate": 100
}
},
"search": [
{
"path": [
"productVariants"
],
"query": "product_id:7154589564985",
"parsed": {
"field": "product_id",
"match_all": "7154589564985"
}
}
]
}
}
query MyQuery {
priceList(id: "gid://shopify/PriceList/22171975737") {
prices(first: 250, query: "product_id:7154589564985") {
nodes {
price {
amount
currencyCode
}
compareAtPrice {
amount
currencyCode
}
variant {
title
}
}
}
}
}
Output:
{
"data": {
"priceList": {
"prices": {
"nodes": [
{
"price": {
"amount": "88.0",
"currencyCode": "INR"
},
"compareAtPrice": null,
"variant": {
"title": "White / X-Small / Rubber"
}
},
{
"price": {
"amount": "100.0",
"currencyCode": "INR"
},
"compareAtPrice": null,
"variant": {
"title": "White / Small / Rubber"
}
},
{
"price": {
"amount": "88.0",
"currencyCode": "INR"
},
"compareAtPrice": null,
"variant": {
"title": "White / Medium / Rubber"
}
},
{
"price": {
"amount": "999.0",
"currencyCode": "INR"
},
"compareAtPrice": null,
"variant": {
"title": "White / Large / Rubber"
}
},
{
"price": {
"amount": "88.0",
"currencyCode": "INR"
},
"compareAtPrice": null,
"variant": {
"title": "Black / X-Small / Rubber"
}
},
{
"price": {
"amount": "88.0",
"currencyCode": "INR"
},
"compareAtPrice": null,
"variant": {
"title": "Black / Small / Rubber"
}
},
{
"price": {
"amount": "88.0",
"currencyCode": "INR"
},
"compareAtPrice": null,
"variant": {
"title": "Black / Medium / Rubber"
}
},
{
"price": {
"amount": "88.0",
"currencyCode": "INR"
},
"compareAtPrice": null,
"variant": {
"title": "Black / Large / Rubber"
}
},
{
"price": {
"amount": "88.0",
"currencyCode": "INR"
},
"compareAtPrice": null,
"variant": {
"title": "Beige / X-Small / Rubber"
}
},
{
"price": {
"amount": "88.0",
"currencyCode": "INR"
},
"compareAtPrice": null,
"variant": {
"title": "Beige / Small / Rubber"
}
},
{
"price": {
"amount": "88.0",
"currencyCode": "INR"
},
"compareAtPrice": null,
"variant": {
"title": "Beige / Medium / Rubber"
}
},
{
"price": {
"amount": "13.99",
"currencyCode": "INR"
},
"compareAtPrice": {
"amount": "999.99",
"currencyCode": "INR"
},
"variant": {
"title": "Beige / Large / Rubber"
}
},
{
"price": {
"amount": "13.99",
"currencyCode": "INR"
},
"compareAtPrice": {
"amount": "999.99",
"currencyCode": "INR"
},
"variant": {
"title": "Beige / Extra Large / Rubber"
}
},
{
"price": {
"amount": "88.0",
"currencyCode": "INR"
},
"compareAtPrice": {
"amount": "0.0",
"currencyCode": "INR"
},
"variant": {
"title": "Black / Extra Large / Rubber"
}
},
{
"price": {
"amount": "999.0",
"currencyCode": "INR"
},
"compareAtPrice": {
"amount": "0.0",
"currencyCode": "INR"
},
"variant": {
"title": "White / Extra Large / Rubber"
}
}
]
}
}
},
"extensions": {
"cost": {
"requestedQueryCost": 25,
"actualQueryCost": 5,
"throttleStatus": {
"maximumAvailable": 2000,
"currentlyAvailable": 1995,
"restoreRate": 100
}
},
"search": [
{
"path": [
"priceList",
"prices"
],
"query": "product_id:7154589564985",
"parsed": {
"field": "product_id",
"match_all": "7154589564985"
}
}
]
}
}
