Hello,
I am currently experiencing an issue with accessing Loox metafields through the Storefront API. Despite having the necessary permissions enabled, the metafields (specifically avg_rating and num_reviews from the “loox” namespace) are not returning any data.
Here’s a summary of the issue:
-
I am using the Storefront API to query product metafields for the avg_rating and num_reviews fields from the loox namespace.
-
The fields are visible in the Shopify Admin and contain valid data. Here is the data I see:
-
num_reviews has a value of 302
-
avg_rating has a value of 4.7
-
-
I have ensured that the permissions for Storefront API access are properly set, and the necessary access scopes are enabled.
However, the query returns null for both fields.
Here is the query I am using:
{
product(handle: "example-t-shirt") {
reviewsRating: metafield(namespace: "loox", key: "avg_rating") {
value
type
}
reviewsCount: metafield(namespace: "loox", key: "num_reviews") {
value
type
}
}
}
The response I receive is:
{
"data": {
"product": {
"reviewsRating": null,
"reviewsCount": null
}
}
}
Could anyone provide insight into why these metafields are not accessible through the Storefront API? Are there additional steps I need to take to ensure they are visible on the frontend?
Thank you for your help!