The types the product review domain defines, with the fields other domains add to them.
Objects
OrderLineReview
Whether the buyer can review one line of their order, or how they did
| Field | Type | Description |
|---|
lineItem | OrderLineItem! | |
reviewable | Boolean! | Delivered, and not reviewed yet |
review | ProductReview | The buyer's own review of the line, in whatever status; null until they write one |
ProductReview
A buyer's review of a product
| Field | Type | Description |
|---|
id | ID! | |
rating | Int! | From 1 to 5 |
title | String | |
text | String | |
authorName | String | The buyer's first name and the initial of their last name; null without a name |
createdAt | DateTime! | |
verifiedPurchase | Boolean! | Written from an order the buyer received |
variant | ProductVariant | The variant the buyer bought, such as their size; null where it is not recorded or no longer sold |
fit | ProductReviewFitType | How the buyer found the size; null where they did not say |
photos | [ProductReviewPhoto!]! | |
status | ProductReviewStatusType! | Where the review is in moderation. Only APPROVED reviews appear on a
product, so PENDING and REJECTED are seen only by the buyer who wrote it. |
ProductReviewCreateResponse
ProductReviewError
Implements Error
ProductReviewFitCount
How many approved reviews found the size one way
ProductReviewPhoto
| Field | Type | Description |
|---|
url | String! | A link that may be signed; read the review again for a fresh one after expiresAt |
expiresAt | DateTime | When url expires; null when it does not |
ProductReviewPhotoUpload
A signed URL to PUT one review photo to, before it is named in productReviewCreate
| Field | Type | Description |
|---|
photoId | ID! | An opaque handle to pass in ProductReviewCreateInput.photoIds |
uploadUrl | URL! | |
expiresAt | DateTime! | |
ProductReviewPhotoUploadResponse
ProductReviewRatingCount
How many approved reviews gave one rating
| Field | Type | Description |
|---|
rating | Int! | |
count | Int! | |
| Field | Type | Description |
|---|
orderId | ID! | The buyer's order the reviewed line belongs to |
lineItemId | ID! | The delivered line that is reviewed |
rating | Int! | From 1 to 5 |
title | String | |
text | String | |
fit | ProductReviewFitType | |
photoIds | [ID!] | Handles from productReviewPhotoUpload, at most 5 |
Enums
ProductReviewErrorCodeType
ORDER_NOT_FOUND | The order is not one of the buyer's |
NOT_DELIVERED | Nothing of the line was delivered yet |
ALREADY_REVIEWED | The buyer already reviewed this line |
ProductReviewFitType
How a buyer found the size of what they bought
RUNS_SMALL | |
TRUE_TO_SIZE | |
RUNS_LARGE | |
ProductReviewSortType
NEWEST | Newest first |
HIGHEST_RATING | Highest rating first, newest first within a rating |
LOWEST_RATING | Lowest rating first, newest first within a rating |
ProductReviewStatusType
Where a review is in moderation
PENDING | Written and awaiting a moderator; not shown on the product |
APPROVED | Shown on the product and counted in its rating |
REJECTED | Refused by a moderator; never shown |
Unions
ProductReviewCreateError
One of ProductReviewError or ValidationError.
ProductReviewPhotoUploadError
One of ValidationError.