Discussing APIs and development related to customers, discounts, and order management.
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.
Thanks!
Solved! Go to the solution
This is an accepted solution.
Hi again,
Are you still experiencing this issue ? We made some changes yesterday which should have fixed this.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi OriFloralDesign,
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.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Thank you so much for the reply Liam!
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.
Hi folks - I've flagged this with our internal dev team and will report back when we've an update.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Also could you DM me a store URL where your seeing the issue with old addresses still being returned in GraphQL queries?
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
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.
Hi again folks - our devs have identified this is a bug on our side and we're looking into resolving this asap. Appreciate your patience on this!
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
This is an accepted solution.
Hi again,
Are you still experiencing this issue ? We made some changes yesterday which should have fixed this.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Seems like it's fixed. Thank you so much!
It has been resolved apologies for the late response. Thanks for your swift response and support!!!
Does this perhaps have anything to do with the new Customer Account API introduced?
Hi Liam,
I am having the same problem. Any news on this subject?
Thank you
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.
We have been encountering the same issue. Old data still shows, data that does not exist.
This is query for getting address.
query getListDeliveryAddress(
\$customerAccessToken: String!
) {
customer(customerAccessToken: \$customerAccessToken) {
updatedAt
addresses(first: 100, reverse: true) {
edges {
node {
address1
address2
city
company
country
countryCodeV2
firstName
formatted
formattedArea
id
lastName
latitude
longitude
name
phone
province
provinceCode
zip
}
}
}
}
}
I'm encountering the same issue.
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."
Facing the same issue, any update on this or any quick solution to filter out these addresses?
Are you still experiencing this issue - we made some changes yesterday which should have fixed this.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
I was also experiencing this problem. It seems to have been fixed. Just tried it now through the Storefront on app.