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
}
}
}
}
}
It is throwing the error in response:
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.