Suppose I deploy multi discounts using the same function for shopify. Is there away I can pass a discount id to run.graphql?
In example:
query RunInput {
discountNode {
metafield(namespace: "I want to pull a discount id, how can I pass it dynamically here?", key: "function-configuration") {
value
}
}
}
Here is a modified code that can help you pass a discountID variable dynamically.
query RunInput($discountId: ID!) {
discountNode(id: $discountId) {
metafield(namespace: "your-namespace", key: "function-configuration") {
value
}
}
}
Hope it helps!