MailingAddress FormattedArea Bug

tecklun
Shopify Partner
1 0 0

Hi, I am using Storefront JS SDK. I've created a custom graph query to get customer information. I've noticed that we've been getting a weird customer address format in the attribute of formatted and formattedArea, i.e. "Kuala Lumpur 14, Malaysia" where it should have been "Kuala Lumpur, Malaysia" ( without the 14 ).

 

However, querying it on Admin API works fine and it also displayed fine on Shopify Admin backend. It was working fine until a few days ago ( around 1st of April ).

 

Query

 

 

const customerQuery = this.client.graphQLClient.query((root) => {
        root.addField('customer', { args: { customerAccessToken } }, (user) => {
          user.add('id');
          user.add('firstName');
          user.add('lastName');
          user.add('email');
          user.add('phone');
          user.addField('defaultAddress', {}, (address) => {
            address.add('id');
          });
          user.addConnection(
            'addresses',
            { args: { first: 99 } },
            (address) => {
              address.add('id');
              address.add('firstName');
              address.add('lastName');
              address.add('address1');
              address.add('address2');
              address.add('city');
              address.add('company');
              address.add('country');
              address.add('formatted');
              address.add('formattedArea');
              address.add('latitude');
              address.add('longitude');
              address.add('name');
              address.add('phone');
              address.add('province');
              address.add('zip');
            },
          );
          user.add('lastIncompleteCheckout', (lastIncompleteCheckout) => {
            lastIncompleteCheckout.add('id');
          });
        });
      });

 

 

Result:

 

 

{
    "id": "Z2...",
    "firstName": "Jason",
    "lastName": "Webb",
    "address1": "Jalan Raja Chulan, Kuala Lumpur",
    "address2": "",
    "city": "Kuala Lumpur",
    "company": "",
    "country": "Malaysia",
    "formatted": [
        "Jalan Raja Chulan, Kuala Lumpur",
        "50200 Kuala Lumpur 14",
        "Malaysia"
    ],
    "formattedArea": "Kuala Lumpur 14, Malaysia",
    "latitude": null,
    "longitude": null,
    "name": "Jason Webb",
    "phone": "+601...8",
    "province": "Kuala Lumpur",
    "zip": "50200"
}

 

 

 

Any ideas? Thank you.

Replies 0 (0)