From 6c304588547097f30b2039135c252a94737fb78d Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Thu, 29 Oct 2026 11:22:43 -0500 Subject: [PATCH 1/4] - Add product review export attributes to Catalog Service products query --- .../catalog-service/queries/products.md | 28 ++++++++++++++++++- .../products/mutations/create-review.md | 2 -- .../product-review-ratings-metadata.md | 2 -- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/src/pages/graphql/schema/catalog-service/queries/products.md b/src/pages/graphql/schema/catalog-service/queries/products.md index 5fb8ee5ec..83f7c88b9 100644 --- a/src/pages/graphql/schema/catalog-service/queries/products.md +++ b/src/pages/graphql/schema/catalog-service/queries/products.md @@ -29,10 +29,36 @@ The `ProductView` output object is different than the core `products` query `Pro * Both simple and complex products can have merchant-defined input options that allow shoppers to customize a product by adding text, date, an image, or a file, for example adding text for engraving. These options can have an associated markup that is applied to the product price. These options are exposed in a top-level `inputOptions` container `[ProductViewInputOption]`. -* Merchant-defined attributes are exposed in a top-level `attributes` container `[ProductViewAttribute]` and indicate their storefront roles. Roles include PDP, PLP, and Search Results display. +* Merchant-defined attributes are exposed in a top-level `attributes` container `[ProductViewAttribute]` and indicate their storefront roles. Roles include PDP, PLP, and Search Results display. Attributes include merchant-defined attributes and, when product reviews are enabled, the system [product review attributes](#product-review-attributes) `ac_review_count` and `ac_rating_summary`. * Images are also accessible as a top-level container, and you can filter them by their role. An image can have an `image`, `small_image`, or `thumbnail` role. +## Product review attributes + +When product reviews are enabled, the `products` query returns review summary data in the `attributes` field on `ProductView`. These are system product attributes, not top-level fields on `ProductView`. + +| Attribute | Description | +|---|---| +| `ac_review_count` | The number of approved product reviews. | +| `ac_rating_summary` | The average rating for approved product reviews, expressed as a value from 0 to 100. Storefronts can convert this value to a star rating. | + +{style="table-layout:auto"} + +The product feed updates when review summaries change. Product reviews are disabled by default. Only approved reviews contribute to the review count and rating summary. + +The existing `attributes` selection in the product query requests these attributes along with other product attributes: + +```graphql +attributes(roles: []) { + name + label + value + roles +} +``` + +To retrieve the list of approved reviews rather than product-level review summary attributes, use the [`reviews` query](../../products/queries/reviews.md). + ## Syntax ```graphql diff --git a/src/pages/graphql/schema/products/mutations/create-review.md b/src/pages/graphql/schema/products/mutations/create-review.md index 1543bb7f1..bca5cffd8 100644 --- a/src/pages/graphql/schema/products/mutations/create-review.md +++ b/src/pages/graphql/schema/products/mutations/create-review.md @@ -4,8 +4,6 @@ description: The createProductReview mutation adds a review for the specified pr --- - - # createProductReview mutation The `createProductReview` mutation adds a review for the specified product. Use the [`productReviewRatingsMetadata` query](../queries/product-review-ratings-metadata.md) to return a list of rating categories and possible values. diff --git a/src/pages/graphql/schema/products/queries/product-review-ratings-metadata.md b/src/pages/graphql/schema/products/queries/product-review-ratings-metadata.md index dd359b29b..298849c9c 100644 --- a/src/pages/graphql/schema/products/queries/product-review-ratings-metadata.md +++ b/src/pages/graphql/schema/products/queries/product-review-ratings-metadata.md @@ -4,8 +4,6 @@ description: The productReviewRatingsMetadata query returns the active ratings a --- - - # productReviewRatingsMetadata query The `productReviewRatingsMetadata` query returns the active ratings attributes and the values each rating can have. In Luma, these values are one star through five stars. From 50feaded7cd71035eb9e7082bab3134022e66ae3 Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Thu, 29 Oct 2026 11:44:26 -0500 Subject: [PATCH 2/4] Apply suggestion from @meker12 --- src/pages/graphql/schema/catalog-service/queries/products.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/graphql/schema/catalog-service/queries/products.md b/src/pages/graphql/schema/catalog-service/queries/products.md index fbec884ae..caf5e2a85 100644 --- a/src/pages/graphql/schema/catalog-service/queries/products.md +++ b/src/pages/graphql/schema/catalog-service/queries/products.md @@ -42,7 +42,6 @@ When product reviews are enabled, the `products` query returns review summary da | `ac_review_count` | The number of approved product reviews. | | `ac_rating_summary` | The average rating for approved product reviews, expressed as a value from 0 to 100. Storefronts can convert this value to a star rating. | -{style="table-layout:auto"} The product feed updates when review summaries change. Product reviews are disabled by default. Only approved reviews contribute to the review count and rating summary. From 90a4b4ad57fca3e8701361c6794faaacc6ae637b Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Thu, 29 Oct 2026 11:50:15 -0500 Subject: [PATCH 3/4] Apply suggestion from @keharper Co-authored-by: Kevin Harper --- src/pages/graphql/schema/catalog-service/queries/products.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/graphql/schema/catalog-service/queries/products.md b/src/pages/graphql/schema/catalog-service/queries/products.md index caf5e2a85..972f2cdfe 100644 --- a/src/pages/graphql/schema/catalog-service/queries/products.md +++ b/src/pages/graphql/schema/catalog-service/queries/products.md @@ -35,7 +35,7 @@ The `ProductView` output object is different than the core `products` query `Pro ## Product review attributes -When product reviews are enabled, the `products` query returns review summary data in the `attributes` field on `ProductView`. These are system product attributes, not top-level fields on `ProductView`. +When product reviews are enabled, the `products` query returns review summary data in the `ProductView.attributes` field. These are system product attributes, not top-level fields on `ProductView`. | Attribute | Description | |---|---| From f75e081f7b7f7e967cce4529a194b393b3031792 Mon Sep 17 00:00:00 2001 From: Margaret Eker Date: Thu, 29 Oct 2026 11:58:30 -0500 Subject: [PATCH 4/4] Apply suggestion from @meker12 --- src/pages/graphql/schema/catalog-service/queries/products.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/graphql/schema/catalog-service/queries/products.md b/src/pages/graphql/schema/catalog-service/queries/products.md index 972f2cdfe..0f5d1793b 100644 --- a/src/pages/graphql/schema/catalog-service/queries/products.md +++ b/src/pages/graphql/schema/catalog-service/queries/products.md @@ -42,7 +42,6 @@ When product reviews are enabled, the `products` query returns review summary da | `ac_review_count` | The number of approved product reviews. | | `ac_rating_summary` | The average rating for approved product reviews, expressed as a value from 0 to 100. Storefronts can convert this value to a star rating. | - The product feed updates when review summaries change. Product reviews are disabled by default. Only approved reviews contribute to the review count and rating summary. The existing `attributes` selection in the product query requests these attributes along with other product attributes: