customerDefaultAddressUpdate method

Future<void> customerDefaultAddressUpdate({
  1. required String addressId,
  2. required String customerAccessToken,
})

updates the default adderess to the addressId provided from the customer to which customerAccessToken belongs to.

Implementation

Future<void> customerDefaultAddressUpdate({
  required String addressId,
  required String customerAccessToken,
}) async {
  final MutationOptions _options = MutationOptions(
      document: gql(customerDefaultAddressUpdateMutation),
      variables: {
        'customerAccessToken': customerAccessToken,
        'addressId': addressId
      });
  final QueryResult result = await _graphQLClient!.mutate(_options);
  checkForError(
    result,
    key: 'customerDefaultAddressUpdate',
    errorKey: 'customerUserErrors',
  );
}