Skip to content

Commit ff32d6d

Browse files
authored
Merge pull request #427 from sivaschenko/lynx-939
LYNX-939: Document breaking change to gift_message_available
2 parents 101201b + 9622a36 commit ff32d6d

File tree

2 files changed

+28
-0
lines changed
  • src
    • _includes/backward-incompatible-changes/commerce
    • pages/development/backward-incompatible-changes

2 files changed

+28
-0
lines changed

src/_includes/backward-incompatible-changes/commerce/2.4.7-2.4.8.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,3 +265,9 @@
265265
#### Class was removed
266266

267267
- Magento\PageBuilder\Block\Adminhtml\Stage\Render
268+
269+
### GraphQL changes
270+
271+
#### GraphQL field type changed
272+
273+
- `ProductInterface.gift_message_available` — type changed from `String` to `Boolean!`

src/pages/development/backward-incompatible-changes/index.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,28 @@ The following module is affected by this change:
143143

144144
* paypal/module-braintree-core
145145

146+
### Updated GraphQL ProductInterface.gift_message_available type
147+
148+
The GraphQL type for `ProductInterface.gift_message_available` was changed from `String` to a non-nullable boolean (`Boolean!`) to provide a consistent and type-safe representation of whether gift messages are available for a product.
149+
150+
**Impact:**
151+
152+
* GraphQL queries and clients that expect a string value will now receive a boolean.
153+
* Frontend code, integrations, and custom GraphQL clients must handle `true`/`false` instead of string values like `"1"`, `"0"`, `"true"`, or `"false"`.
154+
* Custom GraphQL resolvers and extensions that return or map this field must return a boolean value.
155+
* Unit and integration tests that assert string values for this field will fail until updated.
156+
* REST is not affected.
157+
158+
**Action Required:**
159+
160+
1. Update GraphQL queries and client-side code to expect a boolean for `gift_message_available`.
161+
2. Update any custom resolvers or mappers to cast or convert stored values to boolean, for example:
162+
163+
```php
164+
// Example resolver change in a PHP resolver
165+
return (bool) $product->getData('gift_message_available');
166+
```
167+
146168
### Updated default collation for MySQL
147169

148170
The system now defaults to using `utf8mb4` collation for MySQL, ensuring compatibility with MySQL 8 and future-proofing against the deprecation of `utf8mb3`. Previously, the system defaulted to using the `utf8mb3` collation, which is deprecated in MySQL 8.

0 commit comments

Comments
 (0)