How can I get multiple cart attributes in input.graphql? the current solution is single attributes; the following is my code, but my requirements are to check various attributes. We are using the delivery customization function.
attribute(key:“attribute name”){
value
}
SBD
July 7, 2023, 12:02am
2
Hey @Ecommerce5
Try using aliases:
something: attribute(key:"something"){
value
}
another: attribute(key:"another"){
value
}
1 Like
The solution seems legitimate as I was able to run the type gen command using aliases. But again I am facing an issue with output.
This is the output I get in my following code.
query Input {
cart {
orderSat: attribute(key:“Ordered saturday”){
value
}
discountCode: attribute(key:“Discount Code”){
value
}
deliveryGroups {
deliveryAddress {
provinceCode
zip
}
deliveryOptions {
handle
title
cost{
amount
}
}
}
cost {
subtotalAmount {
amount
}
}
}
}
could you explain why I am not getting proper results?
attributes under my cart form:
SBD
July 10, 2023, 3:49am
4
Hey @Ecommerce5
You should be able to get discount codes via cart.discountCodes .