I have try to update the address via GraphQl but somehow not working
Please guide me how can I solve this error
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityWe Need existing Customer Address Id to update address.
Syntax
mutation: {updateCustomerAddress(id: Int!, input: CustomerAddressInput) {CustomerAddress}}
Example:
mutation {
updateCustomerAddress(id:5, input: {
region: {
region_id: 12,
region: "California"
region_code: "CA"
}
country_code: US
street: ["123 Main Street"]
telephone: "7777777777"
postcode: "77777"
city: "Phoenix"
firstname: "Bob"
lastname: "Loblaw"
default_shipping: true
default_billing: false
}) {
id
}
}
Update Reference Link -> https://devdocs.magento.com/guides/v2.4/graphql/mutations/update-customer-address.html#customerAddressRegionInput
region -> DATA TYPE -> String -> The state or province name
region_code -> DATA TYPE -> String -> The address region code
region_id -> DATA TYPE -> Int -> The unique ID for a pre-defined region