I have a hydrogen storefront, and in the customer account section, when an address is deleted, it’s still showing up in graphQL. When I login to the shopify admin, I can see the mailing address was deleted, and I can see the expected addresses, however on my site, all of the deleted addresses are still returning from the graphql query.
This causes errors when a user tries to edit or delete a previously deleted address, as it doesn’t exist any longer.
Are you using the customerAddressDelete mutation or customerAddressUpdate to delete/edit customer addresses? You might want to ensure that it has a valid customer access token present in your request, and that you have the unauthenticated_write_customers access scope.
If there are any errors in the response of the customerAddressDelete mutation, they be in the customerUserErrors field. Check if there are any errors returned after the mutation.
Try the above and hopefully you can see what is causing this issue.
I’m using customerAddressDelete and there are no errors. In fact, I can see the addresses correctly being deleted when I log into my Shopify account and look at the customer. The problem is after they are deleted, they are still showing up in graphQL. In the Shopify admin customer page, I see 3 mailing addresses (as expected), but when I pull down the customer in graphiQL explorer, I’m getting 8 mailing addresses, 5 of which have been previously deleted.
We have been encountering the same issue. Mutations work, data is being changed in Shopify Admin. But when getting customer data, the changes are not being reflected. Old data still shows, data that does not exist.
I’m embarrassed to say I don’t see any way to DM. I can share a link to our current site (Hydrogen v1). I’m seeing the same thing there as I am locally with our Hydrogen v2 site that is about to launch. https://orifloraldesign.com/ If you look at the newest customer, several of those addresses have been deleted and are still showing up.
Upon my initial attempt to delete an address, I received a confirmation message indicating that the address had been successfully deleted. However, the address continues to persist in the list. Subsequently, any further attempts to perform actions such as deleting or updating addresses result in an error message stating “Address not found.”