Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
This is e re-post, of a post on the Shopify Plus community.
https://community.shopify.com/c/shopify-plus/run-code-graphql-input-problems-only-one-order-line-whe...
discountApplications { targetType value { ... on PricingPercentageValue { percentage } } # This cast will break the load of all limeItems ... on AutomaticDiscountApplication { title } }Then only one of the order lines are returned from this section:
lineItems { quantity sku title variant { metafields { key value } } # price_set discountedUnitPriceAfterAllDiscountsSet { shopMoney { amount currencyCode } } # total_price discountedTotalSet { shopMoney { amount currencyCode } } }If i remove the discountApplications, all order lines are returned.
Thanks, I think you have hit a bug with how we are handling the interface type there.
Hi Paul
If you are looking into bug fixing handling types on the run code input - I have an additional observation.
I tried to use a fragment to replace all the prices
E.g.
discountedPriceSet {
...MoneyBagFields
}
Using the fragment
fragment MoneyBagFields on MoneyBag {
shopMoney {
amount
currencyCode
}
}
In this case no prices was returned.
Either it is a special case of the same bug or a new one .
Yeah, that just isn't supported. If you directly add them it should work. How many of these types of fields are you trying to add?
Hi Paul,
Are Fragments support in a "Run Code" input yet? Would be super useful!
Thanks!
Not supported. We are unlikely to implement Fragments
Do you have a workflow run link that you could DM Paul or I with? Looking for a workflow run that returned fewer line items than you were expecting. Thank you!
Hi Peterandersen,
Thanks for reporting this bug, it should now be fixed and all LineItems should be returned in future runs
To learn more visit the Shopify Help Center or the Community Blog.
Hi Jenny
I can confirm that it works as expected.
Thanks
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025