A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
I only need to know the price of a specific product. Please
Solved! Go to the solution
This is an accepted solution.
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
This is an accepted solution.
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