How to remove line item custom attributes using GraphQL?

Hi

I have custom attributes added to the line items on my orders, like this

for a line item the custom attributes: _handles, _products, _sku and quantityPerProduct are added (hidden using '') to do some validations on the frontend

but after the order is paid, I want to delete/modify the attribute: _handle

  • is there any way to do this using Graphql ?

So far I can’t find any mutation that allows me to modify a custom attribute on a line item in an order

Thanks in advance

It doesn’t look like you can edit the existing line item, but it does look like you could potentially add + remove (essentially replace) it to achieve the same thing. I haven’t tested it, but looks like in the admin removal is handled by setting quantity to 0.

1 Like

yes, I tried that and works but when you look the order details you can see the remove/add steps on the order history, that’s why I wondered if there was a direct way to do it

But as you said, I also think this is the only way.

Thanks!!