Make Storefront cache and GraphQL values Sendable#88
Draft
kieran-osgood-shopify wants to merge 1 commit into
Draft
Conversation
This was referenced May 13, 2026
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced May 13, 2026
9eec6dd to
aecdfa8
Compare
aecdfa8 to
a2a8f7d
Compare
08574c6 to
92ab70f
Compare
3dce64e to
3dbd021
Compare
65f806c to
5678177
Compare
3dbd021 to
3afa77a
Compare
5678177 to
679b65c
Compare
3afa77a to
37a6f41
Compare
679b65c to
d8af537
Compare
19eb0e6 to
70f862a
Compare
70f862a to
c1ee065
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.

What changes are you making?
This PR makes the Storefront/GraphQL checkout path safe to use from Swift concurrency contexts by tightening Sendable boundaries around the Storefront client, cache, request/response values, and test doubles.
Important
This intentionally includes a breaking Swift API change:
ShopifyAcceleratedCheckouts.Customeris now aSendablevalue type instead of anObservableObjectclass.Customeris checkout identity data, not independently-owned UI state. Modeling it as an immutable struct matches normal Swift/SwiftUI patterns: app/configuration state owns and publishes values, while async/network code receives safe value snapshots.Consumers should continue to observe the configuration object and assign a new customer value when inputs change:
The sample app was updated to use this pattern in:
This removes the need for an internal
CustomerIdentitywrapper and lets Storefront cart creation acceptCustomer?directly.How to test
Validated locally:
dev swift testdev swift lintdev swift api checkdev swift build samplesBefore you merge
Important
platforms/swift/README.mdand/orplatforms/android/README.md)Releasing a new Swift version?
platforms/swift/ShopifyCheckoutKit.podspecplatforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swiftplatforms/swift/CHANGELOG.mdplatforms/swift/README.md(major version only)Releasing a new Android version?
versionNameinplatforms/android/lib/build.gradleplatforms/android/CHANGELOG.mdplatforms/android/README.mdTip
See the Contributing documentation for the full release process per platform.