Hi, I’m having problem retrieving cart attribute value from the “input.graphql” in a “cart checkout validation” function.
My site is using the new checkout system and I developed a custom extension-only app for customizing it.
There are several extensions in the app. One of the extension is a “cart checkout validation” function.I find that it the cart attributes in the input.graphql are all returning null value. It was working fine (has value) until yesterday.
and I’m not sure why:
Some observations:
I am very sure I did not touch the code and the same piece of code was returning values before.
After checkout, I checked that the order indeed has all of the cart attributes in the order details in admin panel.
Other extension types (e.g. “delivery_customization”, “ui_extension”) in the same app are using the same cart attributes just fine.
I created another “cart checkout validation”, it cannot get the cart attributes also.
I tried disabling/enabling the checkout rule and even reinstalled the whole app, but it does not help.
It seems to me that only the cart attributes in the “cart checkout validation” input are not returning value.
The extension is on api_version = “2023-07”.
My input.graphql:
query Input {
localization {
language {
isoCode
}
}
buyerJourney {
step
}
cart {
attrAddressType: attribute(key: "address_type") {
value
}
attrAddressPrefill: attribute(key: "address_prefill") {
value
}
deliveryGroups {
deliveryAddress {
address1
city
provinceCode
countryCode
zip
}
}
}
}
This problem just happened 7-8 days ago. But in this morning, I rechecked and it came back, and now it’s working. I don’t know why, maybe Shopify just updated something?
Our team shipped a fix for this recently so you shouldn’t be seeing this error moving forward. Please let us know if any of your stores are experiencing this.
i’ve the same issue in my store which is based on Checkout and Customer Accounts Extensibility and we want to develop a delivery customisation function based on the cart attribute.