We’re attempting to answer, via GraphQL query, the question “Does a given merchant have fewer than 25 active automatic discounts, including app-based discounts, so that we can successfully create a Functions Discount for them?”. As far as I can tell, this doesn’t seem to be possible. The automaticDiscountNodes
query doesn’t return Functions discounts, and there doesn’t seem to be a functions equivalent. The discountNodes
query can’t filter by discount type, so we’d have to paginate over potentially millions of discount code nodes. Am I missing something?
Oop! You can filter the discountNodes
query, method:automatic
. That’s what I get for trusting the AI Agent
2 Likes