From 1e3afd3b222e360fb55818f3073ea3b40e527093 Mon Sep 17 00:00:00 2001 From: Derek Wene Date: Tue, 17 Mar 2026 02:55:18 +0000 Subject: [PATCH] fix(product-reviews): fetch product_review relation on order line items in upsert workflow The useQueryGraphStep was only fetching 'items.*' which does not traverse the product_review link on each line item. As a result, lineItem.product_review was always undefined, causing every upsert to create a new review instead of updating the existing one. Fixes #33 --- plugins/product-reviews/src/workflows/upsert-product-reviews.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/product-reviews/src/workflows/upsert-product-reviews.ts b/plugins/product-reviews/src/workflows/upsert-product-reviews.ts index d884ac24..c1312058 100644 --- a/plugins/product-reviews/src/workflows/upsert-product-reviews.ts +++ b/plugins/product-reviews/src/workflows/upsert-product-reviews.ts @@ -31,7 +31,7 @@ export const upsertProductReviewsWorkflow = createWorkflow( const { data: orders } = useQueryGraphStep({ entity: "order", - fields: ["*", "shipping_address.*", "customer.*", "items.*"], + fields: ["*", "shipping_address.*", "customer.*", "items.*", "items.product_review.*"], filters: { id: orderIds, },