How to automatically cancel duplicate orders with same SKU within 24 hours?

It is usually safe to wrap and helpful when it can have spaces.

The doc for what query variables are available is here:

https://shopify.dev/docs/api/admin-graphql/2024-01/objects/QueryRoot#connection-orders (you’ll have to expand it a couple of times)