Basic Discount Code - Products Remove

Hey everyone,

I want to create basic discount code using GraphQL API. My need is super simple.

Discount code should be valid all products EXCEPT a few selected one.

I’m following this link: https://shopify.dev/docs/api/admin-graphql/2024-04/mutations/discountCodeBasicCreate?example=Create+a+basic+code+discount

When I send ProductsToRemove array, it also ask to send ProductsToAdd array.

It’s strange but I try to send all product ids (removing products to remove ones) and then it says can’t send array larger than 250 items.

How can I create discount codes for all products except only a few ones excluded?

It seems doable inside the Shopify admin panel but couldn’t figure out how to do that with GraphQL API.

Can anyone help me with that?