customerUpdate mutation deletes previously saved addresses

SkaiDigital
Shopify Partner
2 0 0

I have a workflow where I create a customer with two addresses using the Sanity CMS. When I create a new user, both addresses show up for the customer in Shopify. Whenever I try to update the addresses using the customerUpdate mutation, only the addresses where the object has changed, are saved to Shopify.

 

If I edit one element on both addresses (invoice and delivery), both are saved to Shopify. But if I only edit one of them, the other one is deleted.

 

I saw this thread, but it seems that the id method is deprecated.

 

 

Replies 2 (2)

reynold-ebs
Shopify Partner
1 0 2

I have the same issue right now. I'm trying to update customer addresses list using `customerUpdate` mutation by just providing customer id and addresses list. Were you able to find solution?

lauri_jalonen
Shopify Partner
6 0 2

Same issue here. The GraphQL mutation customerUpdate deletes existing addresses even though I'm sending an address. This looks like a Shopify GraphQL bug? 

Just in time for your next adventure