The deprecated query is removed from the GraphQL Admin API in version 2027-01. If your app reads a shop’s automatic discounts through , you need to move to the query with a method:automatic filter before you upgrade to 2027-01. Apps on 2026-10 and earlier keep working unchanged while those versions are supported.
What changed
As of API version 2027-01, no longer exists on . Requests that include on 2027-01 return a validation error instead of data. The and types are also removed, because no other fields in the schema return them.
Use instead, with query: "method:automatic". It returns a connection of objects, each exposing the discount itself on the discount field. accepts filters similar to the removed query, including status, , , , and . For details on how to combine filters, see the Shopify API search syntax.
The query is also deprecated in favor of . If you migrate to , you’ll need to migrate again later when that query is removed.
The query is also deprecated in favor of . If you migrate to , you’ll need to migrate again later when that query is removed.
Note: The <code><span class="PreventFireFoxApplyingGapToWBR">automatic<wbr/>Discount<wbr/>Nodes</span></code> query is also deprecated in favor of <code><span class="PreventFireFoxApplyingGapToWBR">discount<wbr/>Nodes</span></code>. If you migrate to <code><span class="PreventFireFoxApplyingGapToWBR">automatic<wbr/>Discount<wbr/>Nodes</span></code>, you’ll need to migrate again later when that query is removed.
You can call to read both code-based and automatic discounts through one query, with a single filter vocabulary.
Who's affected
This removal affects any app that calls and requests API version 2027-01 or later, including apps pinned to unstable once 2027-01 is the latest version. It also affects tooling and generated types that reference or .
Apps that request 2026-10 or earlier continue to work as long as those versions are supported. Apps that already read automatic discounts through don’t need to change anything. Apps that use aren’t affected by this specific removal, but should plan to move to .
If your app doesn’t call , you don’t need to take action for this change.
Why this matters
is one query surface for all discounts, automatic and code-based. You use the same search syntax and pagination pattern across discount types. If your app needs both methods, you read a single paginated list instead of merging separate query results, and new automatic discount types don’t require new query fields.
Breaking changes and migrations
When you request API version 2027-01 or later, any query that includes fails validation. Types that depend on or also break when you regenerate code against 2027-01.
To migrate:
- Search your app for
, including generated GraphQL types and any references toor. - Replace the query with
and passquery: "method:automatic". Move your existing inline fragments one level deeper, onto thediscountfield of. - Regenerate your GraphQL types or schema snapshot against
2027-01so your types match the new shape. - Test against
2027-01in a development store and confirm that the results match what your app returned on2026-10.
Here’s the same request, before and after:
# Before, on 2026-10 and earlier
query {
automaticDiscounts(first: 10) {
nodes {
... on DiscountAutomaticBxgy {
title
status
}
}
}
}
# After, on 2027-01
query {
discountNodes(first: 10, query: "method:automatic") {
nodes {
id
discount {
... on DiscountAutomaticBxgy {
title
status
}
}
}
}
}The inline fragments carry over unchanged. You move them from the nodes under to the discount field of each . If your app reads more than one automatic discount type, add one inline fragment per type on discount, or select shared fields through the interfaces those types implement.
If you can’t migrate before 2027-01, keep your app on 2026-10 or an earlier supported version that still includes until you complete the change.
Action required
Before you upgrade your app to API version 2027-01, update any queries that call to use with query: "method:automatic", and regenerate your types against 2027-01. If you upgrade without migrating, those queries return validation errors and your app no longer reads automatic discounts.
You can confirm the migration worked by running your updated queries against a development store on 2027-01 and checking that the automatic discount data matches what you saw on 2026-10.
If your app doesn’t call , you can upgrade to 2027-01 without changes.