Apply discount code on line Item - order edit api

Hi
I wanted to add a new line Item to an order and apply a discount code to it.
I was able to add line item by using GraphQL api to add a variant id as mentioned here:
https://shopify.dev/docs/apps/fulfillment/order-management-apps/order-editing#add-a-new-variant

But I am not able to apply a discount code to this newly added line item. There is an option to add a fixed discount by mentioning amount/percentage. But we want to apply discount code. Can anyone help?

Hi, you can only use

mutation addDiscount

then you can add amount or percentage.

that’s it in shopify.