@graphcommerce/docs 9.0.0-canary.55 → 9.0.0-canary.56

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,12 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.0.0-canary.56
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2329](https://github.com/graphcommerce-org/graphcommerce/pull/2329) [`6301fe3`](https://github.com/graphcommerce-org/graphcommerce/commit/6301fe33e73be1a151d0f8290e83418b4b87a738) - Document patch custom_attributesV2 for null attribute values issue
8
+ ([@SimonPrins](https://github.com/SimonPrins))
9
+
3
10
  ## 9.0.0-canary.55
4
11
 
5
12
  ## 9.0.0-canary.54
@@ -90,6 +90,19 @@ As a workaround you can apply the following patches:
90
90
 
91
91
  See also https://github.com/magento/magento2/issues/37774
92
92
 
93
+ ## Custom attributes return an error when they have a null value
94
+
95
+ Affected Magento versions:
96
+ - `2.4.7`: all versions
97
+
98
+ In magento version 2.4.7 the custom_attributesV2 field was added to load custom attribute values for a product.
99
+ If a requested attribute value is null then Magento will return an error, since the value is required.
100
+
101
+ You can apply the following patch, which ensures that the attribute is filtered and no error is thrown.
102
+ [fix-error-returning-null-attribute-values.patch](./patches/fix-error-returning-null-attribute-values.patch)
103
+
104
+ See also: https://github.com/magento/magento2/issues/38884
105
+
93
106
  ## Next steps
94
107
 
95
108
  - [Overview](./readme)
@@ -0,0 +1,19 @@
1
+ Fix issue where custom attributes with a null value cause an error when they are returned in the GraphQL API.
2
+ See: https://github.com/magento/magento2/issues/38884
3
+
4
+ @package magento/module-catalog-graph-ql
5
+
6
+ ===================================================================
7
+ diff --git a/Model/Resolver/Product/ProductCustomAttributes.php b/Model/Resolver/Product/ProductCustomAttributes.php
8
+ --- a/Model/Resolver/Product/ProductCustomAttributes.php
9
+ +++ b/Model/Resolver/Product/ProductCustomAttributes.php (date 1721216924752)
10
+ @@ -110,6 +110,9 @@
11
+ if (is_array($attributeValue)) {
12
+ $attributeValue = implode(',', $attributeValue);
13
+ }
14
+ + if (!$attributeValue) {
15
+ + continue;
16
+ + }
17
+ $customAttributes[] = [
18
+ 'attribute_code' => $attributeCode,
19
+ 'value' => $attributeValue
package/package.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "name": "@graphcommerce/docs",
3
3
  "homepage": "https://www.graphcommerce.org/docs",
4
4
  "repository": "github:graphcommerce-org/graphcommerce/docs",
5
- "version": "9.0.0-canary.55",
5
+ "version": "9.0.0-canary.56",
6
6
  "sideEffects": true,
7
7
  "peerDependencies": {
8
- "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.55"
8
+ "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.56"
9
9
  },
10
10
  "prettier": "@graphcommerce/prettier-config-pwa"
11
11
  }