How can I get the price of a specific product using GraphQL?

I only need to know the price of a specific product. Please

You always need the productvariant id of the product. Every product in shopify has a variant, even if it doesn’t look like it has a variant, and the price is always attached to the variant.

{
productVariant(id: "gid://shopify/ProductVariant/{productvariant_id}") {
price
}
}

Just replace {productvariant_id} with the actual product variant id and you will get the price back.

Cheers,

Gary

1 Like