A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
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