Skip to content

Product review types

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

FieldTypeDescription
lineItemOrderLineItem!
reviewableBoolean!Delivered, and not reviewed yet
reviewProductReviewThe buyer's own review of the line, in whatever status; null until they write one

ProductReview

A buyer's review of a product

FieldTypeDescription
idID!
ratingInt!From 1 to 5
titleString
textString
authorNameStringThe buyer's first name and the initial of their last name; null without a name
createdAtDateTime!
verifiedPurchaseBoolean!Written from an order the buyer received
variantProductVariantThe variant the buyer bought, such as their size; null where it is not recorded or no longer sold
fitProductReviewFitTypeHow the buyer found the size; null where they did not say
photos[ProductReviewPhoto!]!
statusProductReviewStatusType!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

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

ProductReviewError

Implements Error

FieldTypeDescription
messageString!
codeProductReviewErrorCodeType!

ProductReviewFitCount

How many approved reviews found the size one way

FieldTypeDescription
fitProductReviewFitType!
countInt!

ProductReviewPhoto

A photo a review shows

FieldTypeDescription
urlString!A link that may be signed; read the review again for a fresh one after expiresAt
expiresAtDateTimeWhen url expires; null when it does not

ProductReviewPhotoUpload

A signed URL to PUT one review photo to, before it is named in productReviewCreate

FieldTypeDescription
photoIdID!An opaque handle to pass in ProductReviewCreateInput.photoIds
uploadUrlURL!
expiresAtDateTime!

ProductReviewPhotoUploadResponse

FieldTypeDescription
uploadProductReviewPhotoUpload
reviewErrors[ProductReviewPhotoUploadError!]Such as a content type the shop does not take, or a shop that takes no photos

ProductReviewRatingCount

How many approved reviews gave one rating

FieldTypeDescription
ratingInt!
countInt!

ProductReviewResult

FieldTypeDescription
items[ProductReview!]!
paginationPagination!

Input objects

ProductReviewCreateInput

FieldTypeDescription
orderIdID!The buyer's order the reviewed line belongs to
lineItemIdID!The delivered line that is reviewed
ratingInt!From 1 to 5
titleString
textString
fitProductReviewFitType
photoIds[ID!]Handles from productReviewPhotoUpload, at most 5

Enums

ProductReviewErrorCodeType

ORDER_NOT_FOUNDThe order is not one of the buyer's
NOT_DELIVEREDNothing of the line was delivered yet
ALREADY_REVIEWEDThe buyer already reviewed this line

ProductReviewFitType

How a buyer found the size of what they bought

RUNS_SMALL
TRUE_TO_SIZE
RUNS_LARGE

ProductReviewSortType

NEWESTNewest first
HIGHEST_RATINGHighest rating first, newest first within a rating
LOWEST_RATINGLowest rating first, newest first within a rating

ProductReviewStatusType

Where a review is in moderation

PENDINGWritten and awaiting a moderator; not shown on the product
APPROVEDShown on the product and counted in its rating
REJECTEDRefused by a moderator; never shown

Unions

ProductReviewCreateError

One of ProductReviewError or ValidationError.

ProductReviewPhotoUploadError

One of ValidationError.