Edit in GitHubLog an issue

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.

Use the createProductReview mutation to add a product review.

Syntax

productReviewRatingsMetadata: ProductReviewRatingsMetadata!

Reference

The productReviewRatingsMetadata reference provides detailed information about the types and fields defined in this query.

Example usage

The following query returns the metadata for all active ratings attributes. In this example, the default Rating attribute has been renamed to Overall, and the Quality and Value attributes have been enabled.

Request:

Copied to your clipboard
query {
productReviewRatingsMetadata {
items {
id
name
values {
value_id
value
}
}
}
}

Response:

Copied to your clipboard
{
"data": {
"productReviewRatingsMetadata": {
"items": [
{
"id": "NA==",
"name": "Overall",
"values": [
{
"value_id": "MTY=",
"value": "1"
},
{
"value_id": "MTc=",
"value": "2"
},
{
"value_id": "MTg=",
"value": "3"
},
{
"value_id": "MTk=",
"value": "4"
},
{
"value_id": "MjA=",
"value": "5"
}
]
},
{
"id": "MQ==",
"name": "Quality",
"values": [
{
"value_id": "MQ==",
"value": "1"
},
{
"value_id": "Mg==",
"value": "2"
},
{
"value_id": "Mw==",
"value": "3"
},
{
"value_id": "NA==",
"value": "4"
},
{
"value_id": "NQ==",
"value": "5"
}
]
},
{
"id": "Mg==",
"name": "Value",
"values": [
{
"value_id": "Ng==",
"value": "1"
},
{
"value_id": "Nw==",
"value": "2"
},
{
"value_id": "OA==",
"value": "3"
},
{
"value_id": "OQ==",
"value": "4"
},
{
"value_id": "MTA=",
"value": "5"
}
]
}
]
}
}
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.