Filter/fetch discounts by app or function

It seems there’s no way to fetch all the discounts that were created by the app or associated with a specific function. It would be great if we can filter by these fields (at least app), so there’s a way to fetch only the discounts that we created.

Storing the IDs externally works too, but there’s the risk of getting out of sync.

It looks like this was already suggested, however it isn’t currently “solved”, just currently tracked by the team:
https://community.shopify.dev/t/feature-request-filter-discountnodes-by-app-id-or-api-key