App reviews, troubleshooting, and recommendations
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 am developing an app with checkout UI extensibility, where I am calling a graphQL API to fetch the the product and it variants. I need the field "quantityAvailable" for the variant.
Here I am sharing the query:
query { product(id: "${lineProductID}") { id title totalInventory variants(first: 10) { edges { node { id title quantityAvailable availableForSale requiresShipping sku } } } } }
message : "Access denied for quantityAvailable field. Required access: `unauthenticated_read_product_inventory` access scope."Here I am sharing my apps access scope which I have in the shopify.app.toml file:
# This file stores configurations for your Shopify app. scopes = "read_orders,write_orders,write_products,read_products,read_inventory,read_product_listings,unauthenticated_read_product_inventory,unauthenticated_read_product_listings,unauthenticated_read_collection_publications,unauthenticated_read_product_publications,unauthenticated_read_product_tags,unauthenticated_read_selling_plans,unauthenticated_read_collection_listings"Please help me to resolve the issue. It is urgently needed.
Did you find a solution to this?
@Sanchari I got the same exact error trying to access "quantityAvailable": it complains about missing "unauthenticated_read_product_inventory" access, yet I can see it there in the apps' scopes. Did you figure out the solution? Thanks.
Hey!
I solved this. You have to check this field in your headless plugin settings.
Sorry which field?
I am not using any headless plugin