GraphQL is returning deleted customer mailing addresses, Shopify admin is showing the correct addres

Solved

GraphQL is returning deleted customer mailing addresses, Shopify admin is showing the correct addres

OriFloralDesign
Tourist
4 0 2

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!

Accepted Solution (1)
Liam
Community Manager
3108 341 879

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

View solution in original post

Replies 17 (17)

Liam
Community Manager
3108 341 879

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

OriFloralDesign
Tourist
4 0 2

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.

Liam
Community Manager
3108 341 879

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

Liam
Community Manager
3108 341 879

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

OriFloralDesign
Tourist
4 0 2

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.

Liam
Community Manager
3108 341 879

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

Liam
Community Manager
3108 341 879

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

OriFloralDesign
Tourist
4 0 2

Seems like it's fixed. Thank you so much!

nadeem_wbwr97
Shopify Partner
4 0 3

It has been resolved apologies for the late response. Thanks for  your swift response and support!!!

nadeem_wbwr97
Shopify Partner
4 0 3

Does this perhaps have anything to do with the new Customer Account API introduced?

jorgebraz
Shopify Partner
1 0 1

Hi Liam,

 

I am having the same problem. Any news on this subject?

 

Thank you

nadeem_wbwr97
Shopify Partner
4 0 3

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.



akkyyyy
Shopify Partner
14 4 4

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
        }
       }
      }
    }
  }

 

gianrocha
Visitor
1 0 2

 

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."

yasicmd
Shopify Partner
1 0 0

Facing the same issue, any update on this or any quick solution to filter out these addresses?

Liam
Community Manager
3108 341 879

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

KamandaK9
Visitor
1 0 0

I was also experiencing this problem. It seems to have been fixed. Just tried it now through the Storefront on app.