A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hello! I have a query here for DiscountCode and I want to filter by `createdBy` an external app. I want to retrieve all DiscountCodes that have not been created by an external app however, I'd like to do this query at the top level to return them. Is this possible in this API? Thank you.
{
discountNodes(first: 19, query: "status:active", reverse: true) {
edges {
node {
id
discount {
... on DiscountCodeBasic {
title
status
codes(first: 1) {
edges {
node {
code
createdBy {
id
title
}
}
}
}
}
}
}
}
}
}
Hi , there
Appears that there is no direct method to filter DiscountCodes based on the createdBy field. However, you can retrieve all the discount codes through a query and then apply manual filtering in your program logic. what do you think?