Many Shopify stores have thousands of discount codes, and it’s currently not possible to filter discountNodes to just those created by a specific app. This causes:
Slow lookups for apps managing discounts
Unnecessary pagination and API rate limiting
Difficulty estimating how many discounts an app has created
Feature request:
Allow filtering by appId or app_public_key in the discountNodes query, e.g.:
{
discountNodes(
query: "appId:APP_ID_HERE"
# or
query: "app_public_key:APP_PUBLIC_KEY_HERE"
) {
id
}
}
Additional query parameters could include functionId.
This would improve QOL for both developers, and merchants using our apps. Thanks.
Knowing the discount nodes registered on the merchant’s store is critical for developers to be able to display feedback in our apps that the discount is created.
Just adding a simple appId or publicKey query interface would be enough.
The type filter doesn’t really help because there can be multiple functions of that type registered by other apps on the same merchant’s store that still introduces a pagination requirement possibility.
For now, my plan is to back up users’ discounts to our database for faster lookups and easier pagination. This approach has its fair share of cons, but it’s viable.