Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion src/pages/graphql/schema/catalog-service/queries/products.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,34 @@ 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 `ProductView.attributes` field. 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. |

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
Expand Down
2 changes: 0 additions & 2 deletions src/pages/graphql/schema/products/mutations/create-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ description: The createProductReview mutation adds a review for the specified pr

---

<Fragment src="../../../../includes/paas-only.md"/>

# 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ description: The productReviewRatingsMetadata query returns the active ratings a

---

<Fragment src="../../../../includes/paas-only.md"/>

# 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.
Expand Down
Loading