Describe the bug
When using the Android Buy SDK to update a cart's buyerIdentity via the cartBuyerIdentityUpdate mutation, setting fields (e.g., customerAccessToken, email, phone) to null does not actually clear them on the cart object.
The same mutation works as expected on iOS (Shopify iOS Buy SDK) and via direct Storefront API calls, where passing null properly removes/clears the values.
On Android, it seems the SDK either omits the fields entirely or does not serialize the explicit null values in the GraphQL request, causing Shopify to keep the old values.
To Reproduce
- Have a cart with an existing
buyerIdentity (e.g., after logging in a customer).
- Call
cartBuyerIdentityUpdate from the Android Buy SDK:
Storefront.CartBuyerIdentityInput input = new Storefront.CartBuyerIdentityInput()
.setCustomerAccessToken(null))
mutationQuery.cartBuyerIdentityUpdate(cartId, input, cart -> cart.id());
- Android Buy SDK version: 2025.4.1