Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Storefront query customer addresses result do not reflect changes(add/update/delete)- Mobile Buy SDK

Storefront query customer addresses result do not reflect changes(add/update/delete)- Mobile Buy SDK

jumper1340
Shopify Partner
4 0 0


I am working on an iOS app using storefront api, i have a profile page that allow user to add/update/delete addresses. so far i've managed to use these functions

Storefront.buildMutation on:

- customerAddressCreate 

- customerAddressUpdate (passed address ID)

- customerAddressDelete (passed address ID)

those return no errors, the addresses data shown correctly on the store website, however the issue is addresses i got on the app still remains the same. 

 

Context:

  • Mobile Buy SDK: 12.0.0
  • Native iOS, UIKit
  • XCode 15.2

 

Troubleshooting Steps Taken:

  • Verified successful execution of mutations (no errors).
  • Confirmed address updates on the store website.
  • Restarted the app to make sure the addresses api is running and the data is retreived

 

Here is the code snippet that i have on a function that get all the customer addresses

 

 .customer(customerAccessToken: accessToken) { $0
                .id()
                .displayName()
                .email()
                .firstName()
                .lastName()
                .phone()
                .updatedAt()
                .addresses(first: Int32(100)) {
                    $0.nodes { $0
                        .id()
                        .firstName()
                        .lastName()
                        .phone()
                        .address1()
                        .address2()
                        .city()
                        .country()
                        .countryCodeV2()
                        .province()
                        .provinceCode()
                        .zip()
                    }
                }

 

 

Replies 0 (0)