A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hello everyone.
I have been trying to fetch price rules with the GraphQL API and am having an issue.
Say I'm having this in my GraphQL call:
{
priceRules(first: 10) {
edges {
cursor
node {
id
title
summary
startsAt
endsAt
discountCodesCount
}
}
pageInfo {
hasPreviousPage
hasNextPage
}
}
}
There seems to be no problem with this call, all price rules are fetched correctly, except for the price rules for any Buy X Get Y discounts having the minimum purchase amount setting!
I have searched everywhere in the forum and people said the GraphQL works, but actually it doesn't.
Anyone else having the same issue? 😞
Hi @CodartApp
Thanks for letting us know about this - I'm seeing the same behaviour in my testing. I'm going to do some more investigation here and I'll let you know what I find.
To learn more visit the Shopify Help Center or the Community Blog.
I'm also facing the same issue. priceRules GraphQL API returns all priceRules except the ones which are created in the Buy X Get Y Category with the Precentage (%) format (minimum purchase amount). If priceRule is created with the item format in Buy X Get Y category, they are appearing in response.
Did you find any solution @CodartApp