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

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!

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.

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

Hi folks - I’ve flagged this with our internal dev team and will report back when we’ve an update.

Also could you DM me a store URL where your seeing the issue with old addresses still being returned in GraphQL queries?

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.

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

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

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!

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.

Hi again,

Are you still experiencing this issue ? We made some changes yesterday which should have fixed this.

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

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