@graphcommerce/magento-review 8.0.5 → 8.0.6-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Change Log
2
2
 
3
+ ## 8.0.6-canary.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2213](https://github.com/graphcommerce-org/graphcommerce/pull/2213) [`a0d952e`](https://github.com/graphcommerce-org/graphcommerce/commit/a0d952e6b8a71a7451bfdb2bdb5150fc218169e2) - Moved product reviews to the relatedUpsells query so we do not pass the queryComplexity limit
8
+ ([@paales](https://github.com/paales))
9
+
10
+ ## 8.0.6-canary.0
11
+
3
12
  ## 8.0.5
4
13
 
5
14
  ## 8.0.5-canary.10
@@ -1,5 +1,4 @@
1
- fragment JsonLdProductReview on ProductInterface @inject(into: ["JsonLdProduct"]) {
2
- ...ProductReviews
3
- review_count
1
+ fragment JsonLdProductReview on ProductInterface {
4
2
  rating_summary
3
+ ...ProductReviews
5
4
  }
@@ -2,7 +2,7 @@ import type { Product } from 'schema-dts'
2
2
  import type { JsonLdProductReviewFragment } from './JsonLdProductReview.gql'
3
3
 
4
4
  export function jsonLdProductReview(
5
- props: JsonLdProductReviewFragment,
5
+ props: Partial<JsonLdProductReviewFragment>,
6
6
  ): Pick<Product, 'aggregateRating' | 'review'> {
7
7
  const { reviews, review_count, rating_summary } = props
8
8
 
@@ -12,7 +12,7 @@ export function jsonLdProductReview(
12
12
  reviewCount: review_count ?? undefined,
13
13
  ratingValue: rating_summary ? Math.max(rating_summary * 0.5 * 0.1, 1) : undefined,
14
14
  },
15
- review: reviews.items.map((review) => ({
15
+ review: reviews?.items.map((review) => ({
16
16
  '@type': 'Review',
17
17
  reviewRating: {
18
18
  '@type': 'Rating',
@@ -1,4 +1,4 @@
1
- fragment ProductReviews on ProductInterface @inject(into: ["ProductPageItem"]) {
1
+ fragment ProductReviews on ProductInterface {
2
2
  reviews(pageSize: $reviewPageSize, currentPage: $reviewPage) {
3
3
  page_info {
4
4
  total_pages
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-review",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "8.0.5",
5
+ "version": "8.0.6-canary.1",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -18,17 +18,17 @@
18
18
  "typescript": "5.3.3"
19
19
  },
20
20
  "peerDependencies": {
21
- "@graphcommerce/eslint-config-pwa": "^8.0.5",
22
- "@graphcommerce/graphql": "^8.0.5",
23
- "@graphcommerce/graphql-mesh": "^8.0.5",
24
- "@graphcommerce/image": "^8.0.5",
25
- "@graphcommerce/magento-customer": "^8.0.5",
26
- "@graphcommerce/magento-product": "^8.0.5",
27
- "@graphcommerce/magento-store": "^8.0.5",
28
- "@graphcommerce/next-ui": "^8.0.5",
29
- "@graphcommerce/prettier-config-pwa": "^8.0.5",
30
- "@graphcommerce/react-hook-form": "^8.0.5",
31
- "@graphcommerce/typescript-config-pwa": "^8.0.5",
21
+ "@graphcommerce/eslint-config-pwa": "^8.0.6-canary.1",
22
+ "@graphcommerce/graphql": "^8.0.6-canary.1",
23
+ "@graphcommerce/graphql-mesh": "^8.0.6-canary.1",
24
+ "@graphcommerce/image": "^8.0.6-canary.1",
25
+ "@graphcommerce/magento-customer": "^8.0.6-canary.1",
26
+ "@graphcommerce/magento-product": "^8.0.6-canary.1",
27
+ "@graphcommerce/magento-store": "^8.0.6-canary.1",
28
+ "@graphcommerce/next-ui": "^8.0.6-canary.1",
29
+ "@graphcommerce/prettier-config-pwa": "^8.0.6-canary.1",
30
+ "@graphcommerce/react-hook-form": "^8.0.6-canary.1",
31
+ "@graphcommerce/typescript-config-pwa": "^8.0.6-canary.1",
32
32
  "@lingui/core": "^4.2.1",
33
33
  "@lingui/macro": "^4.2.1",
34
34
  "@lingui/react": "^4.2.1",