Skip to content

productReviewCreate

Mutationin Product review

Review a delivered line of one of the signed-in buyer's orders, once per line. The review is PENDING and is shown on the product only once a moderator approves it. A rating outside 1 to 5 is a ValidationError on input.rating.

Arguments

ArgumentTypeDescription
inputProductReviewCreateInput!

Returns

ProductReviewCreateResponse!

FieldTypeDescription
reviewProductReviewThe review, PENDING until a moderator approves it
reviewErrors[ProductReviewCreateError!]

Example

mutation ProductReviewCreate($input: ProductReviewCreateInput!) {
productReviewCreate(input: $input) {
review {
id
rating
title
text
authorName
createdAt
verifiedPurchase
fit
status
}
reviewErrors {
__typename
... on ProductReviewError {
message
code
}
... on ValidationError {
message
}
}
}
}

The query selects the return type's fields two levels deep; pick the ones you need. The response shows its shape with placeholder values.

Served by

@evolve-framework/commercetoolsResolved

Used by

The storefront packages that send it, in these GraphQL documents: