chore(cart): remove redundant gift card code deduplication#3402
Merged
chore(cart): remove redundant gift card code deduplication#3402
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
5 tasks
Contributor
|
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
59c479d to
254bc3e
Compare
e42e3e3 to
581d680
Compare
254bc3e to
f0d7fc3
Compare
581d680 to
0526f35
Compare
Contributor
|
We detected some changes in |
fredericoo
approved these changes
Jan 23, 2026
graygilmore
approved these changes
Jan 26, 2026
packages/hydrogen/src/cart/queries/cartGiftCardCodeUpdateDefault.ts
Outdated
Show resolved
Hide resolved
0526f35 to
612ebee
Compare
cbf41a0 to
c24fd25
Compare
612ebee to
1d43ad3
Compare
c24fd25 to
9268ed7
Compare
68a4ee6 to
faecd2a
Compare
9268ed7 to
79d73b7
Compare
This was referenced Jan 27, 2026
faecd2a to
ebd7116
Compare
79d73b7 to
403c1f5
Compare
Removes client-side duplicate filtering from `cartGiftCardCodesUpdate`. ## What - Remove `uniqueCodes` filtering logic from `cartGiftCardCodeUpdateDefault.ts` ## Why E2E testing confirmed the Storefront API handles duplicate gift card codes gracefully (idempotent behavior). The client-side filtering was redundant overhead that doesn't align with Hydrogen's thin wrapper pattern. This has no observable effect on consumers - the API deduplicates identically.
ebd7116 to
cb68e36
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

WHY are these changes introduced?
E2E testing confirmed the Storefront API handles duplicate gift card codes gracefully (idempotent behavior). The client-side filtering in
cartGiftCardCodesUpdatewas redundant overhead that doesn't align with Hydrogen's thin wrapper pattern.WHAT is this pull request doing?
Removes the
uniqueCodesfiltering logic fromcartGiftCardCodeUpdateDefault.ts.Behavior change: None. The API deduplicates identically to the client-side logic that was removed.
HOW to test your changes?
This is an internal cleanup with no observable behavior change. The existing tests verify the mutation still works correctly.
Checklist