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
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025