App reviews, troubleshooting, and recommendations
i want to show products with discount code coupon apply for this product automatically with code / react js /graphql
Hi @ocianX ,
Here is graphql to get products with discount code coupon.
query DISCOUNT {
shop {
name
}
codeDiscountNodes(first: 10) {
edges {
node {
id
codeDiscount {
... on DiscountCodeBasic {
codes(first: 2) {
edges {
node {
id
code
}
}
}
customerGets {
items {
... on DiscountProducts {
__typename
products(first: 10) {
edges {
node {
id
handle
title
}
}
}
}
}
value {
... on DiscountPercentage {
__typename
percentage
}
}
}
}
}
}
}
}
}
This will give you products with discount codes and value.
Let me know this worked for you or not.
Thanks....
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025