This query does not give me the automatic discount code that was applied on the order...
{
order(id: "gid://shopify/Order/3881781461190") {
discountCode
}
}
But you can see there was a discount applied...
discountCode seems to give me text that was added to a discount on a manual order entry via the shopify admin, but not on codes in the cart.