-
Notifications
You must be signed in to change notification settings - Fork 380
BREAKING CHANGE: document updated cartDeliveryAddressesUpdate empty array behavior #3393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BREAKING CHANGE: document updated cartDeliveryAddressesUpdate empty array behavior #3393
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
8ee2d97 to
47ab1c3
Compare
This comment has been minimized.
This comment has been minimized.
47ab1c3 to
1767edf
Compare
1767edf to
75e2538
Compare
2652707 to
37ee345
Compare
packages/hydrogen/src/cart/queries/cartDeliveryAddressesUpdateDefault.test.ts
Outdated
Show resolved
Hide resolved
packages/hydrogen/src/cart/queries/cartDeliveryAddressesUpdateDefault.test.ts
Outdated
Show resolved
Hide resolved
packages/hydrogen/src/cart/queries/cartDeliveryAddressesUpdateDefault.tsx
Outdated
Show resolved
Hide resolved
37ee345 to
cd65345
Compare
020bf08 to
ba32024
Compare
ba32024 to
fb9135a
Compare
| expect(result.userErrors?.[0]).toContain(cartFragment); | ||
| }); | ||
|
|
||
| it('should erase all addresses when passing an empty array', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd be okay with 🔥 nuking this test, but I also won't scream if we leave it in
| ## What Changed | ||
|
|
||
| **Before (API ≤ 2025-07):** | ||
| Passing an empty array did not update any addresses, essentialy a no-op. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Passing an empty array did not update any addresses, essentialy a no-op. | |
| Passing an empty array did not update any addresses, essentially a no-op. |
|
|
||
| `cart.updateDeliveryAddresses` mutation now clears all delivery addresses when passed an empty array | ||
|
|
||
| ## Breaking Behavior Change in Storefront API 2025-10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically this changeset should be marked as major since it's a breaking change, though functionally it's okay as is since we already have a major changeset for Hydrogen in this release batch.
I think we should update the PR title to be BREAKING CHANGE: <description> (and ensure the squash + merge commit also has that title) to follow proper conventional commit standards
7327d10 to
24d26ad
Compare

WHY are these changes introduced?
Fixes #3273
Shopify Storefront API 2025-10 changed
cartDeliveryAddressesUpdatemutation to explicitly clear all delivery addresses when passed an empty array. This behavior wasundefinedin previous API versions.Investigation Summary
Root Cause: API contract evolution + documentation gap (not a code defect)
Key Findings:
Conclusion: Documentation and test updates only. No code changes required.
WHAT is this pull request doing?
Changes Made (TDD Approach)
1. Added Failing Tests (Commit
40b8ff688)2. Updated Documentation (Commit
71b887210)3. Added Edge Case Tests (Commit
804c6fa6e)4. Created Changeset (Commit
2864a669d)Test Coverage Added
14 tests total (from 2 tests):
Documentation Updates
JSDoc Changes:
HOW to test your changes?
Run Tests
Expected: All 14 tests pass
Verify Documentation
Checklist