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.

Cannot update shipping addres at checkout with Storefront API

Solved

Cannot update shipping addres at checkout with Storefront API

mgodoy
Visitor
2 1 0

Hi there! I'm trying to create a checkout with storefront, and neither the mutation checkoutCreate nor checkoutShippingAddressUpdateV2 will let me add shippingAddresses. When trying to perform a mutation, all I receive is null without much more info. An example of a mutation would be

mutation CheckoutShippingAddressUpdateV2 {
      checkoutShippingAddressUpdateV2(
        checkoutId: "gid://shopify/Checkout/CHECKOUT_ID",
        shippingAddress: {
                address1: "Address",
            address2:"null",
            city:"City",
            company: "null",
            country:"Spain",
            firstName:"M",
            lastName:"Godoy",
            phone: "+16135551111",
            province:"Madrid",
            zip:"0000",
        }         
      ) {
        checkout {
          id
          shippingAddress {
              address1
          }
        }
      }
    }
Accepted Solution (1)

mgodoy
Visitor
2 1 0

This is an accepted solution.

Forgot to check for userErrors and checkoutUserErrors. I'm too early in the development of this store and payments are not set up

 

View solution in original post

Reply 1 (1)

mgodoy
Visitor
2 1 0

This is an accepted solution.

Forgot to check for userErrors and checkoutUserErrors. I'm too early in the development of this store and payments are not set up