Why the Removal of automaticDiscounts Impacts Your Shopify Apps (and How to Fix It)

Shopify’s 2027-01 API version drops the automaticDiscounts query, breaking apps that read automatic discounts. Learn what changed, who’s affected, and step‑by‑step migration to discountNodes so your app stays functional.

Why the Removal of automaticDiscounts Impacts Your Shopify Apps (and How to Fix It)
7 sections

Shopify just announced a breaking change for developers: the automaticDiscounts query is gone in API version 2027‑01. If your app relies on reading a shop’s automatic discounts, the next upgrade will throw validation errors unless you migrate to the new discountNodes query. This post breaks down the change, tells you who needs to act, and provides a clear migration path with code examples.

What Changed in API 2027‑01

In version 2027‑01 the automaticDiscounts field disappears from the GraphQL QueryRoot. The associated types—DiscountAutomaticConnection and DiscountAutomaticEdge—are also removed. Any request that still references automaticDiscounts now fails validation. Shopify replaced this niche query with the more versatile discountNodes query, which can be filtered with method:automatic to return only automatic discounts.

Who Is Affected?

  • Developers & Apps – Any app (public, custom, or private) that calls automaticDiscounts or uses the deprecated GraphQL types will break once it targets 2027‑01 or later. This includes generated type files, SDK wrappers, and any tooling that introspects the schema.
  • Merchants – Indirectly affected only if the app they rely on stops delivering automatic discount data after the upgrade.
  • Unaffected – Apps that already use discountNodes (or never read automatic discounts) can upgrade to 2027‑01 without changes. Apps pinned to 2026‑10 or earlier continue to work as long as those versions remain supported.
  • Why It Matters

    discountNodes consolidates automatic and code‑based discounts under a single query surface. This simplifies pagination, search syntax, and future‑proofs your code against new discount types. By moving now, you avoid a hard break and gain a cleaner, more consistent API experience.

    Step‑by‑Step Migration Guide

  • Search and Identify – Look for any occurrence of automaticDiscounts, DiscountAutomaticConnection or DiscountAutomaticEdge in your codebase, GraphQL fragments, and generated type files.
  • Replace the Query – Swap the old query with discountNodes and add the filter query: "method:automatic".
  • Adjust Inline Fragments – Move your existing fragments one level deeper, under the discount field of each DiscountNode.
  • Regenerate Types – Run your GraphQL code‑gen (or download a fresh schema snapshot) against the 2027‑01 version so your TypeScript/Ruby/Go types reflect the new shape.
  • Test Locally – Execute the updated query against a development store set to 2027‑01. Verify that the returned fields match the data you previously received.
  • Deploy – Once tests pass, push the changes and upgrade your app’s API version to 2027‑01.
  • Before vs. After Example

    graphql

    # 2026‑10 (pre‑migration)

    query {

    automaticDiscounts(first: 10) {

    nodes {

    ... on DiscountAutomaticBxgy {

    title

    status

    }

    }

    }

    }

    graphql

    # 2027‑01 (post‑migration)

    query {

    discountNodes(first: 10, query: "method:automatic") {

    nodes {

    id

    discount {

    ... on DiscountAutomaticBxgy {

    title

    status

    }

    }

    }

    }

    }

    Notice how the inline fragment now lives under discount and each node also returns an id—useful for pagination and caching.

    Testing & Validation Checklist

  • [ ] Run a GraphQL introspection against 2027‑01 to confirm automaticDiscounts is absent.
  • [ ] Execute the new discountNodes query in a dev store and compare result counts with the old query.
  • [ ] Check that any TypeScript interfaces (e.g., DiscountAutomaticBxgy) still compile after moving under discount.
  • [ ] Verify pagination (cursor/hasNextPage) works the same way as before.
  • [ ] Update unit/integration tests that mock the old query.
  • [ ] Ensure error handling for validation errors is removed (the error will no longer appear after migration).
  • Action Required Summary

    *If you call automaticDiscounts*: update the query to discountNodes with method:automatic, regenerate schema/types, and test on 2027‑01 before upgrading your app’s version.

    *If you don’t*: you can safely move to 2027‑01 without any code changes.

    *If you still need more time*: keep your app pinned to 2026‑10 (or an earlier supported version) until you complete the migration, but plan to upgrade soon because older versions will eventually be deprecated.

    Conclusion & Next Steps

    The removal of automaticDiscounts is a classic Shopify deprecation that pushes developers toward a unified discount API. By migrating now, you avoid service interruptions for merchants and unlock a simpler way to work with all discount types. Update your queries, regenerate your types, and run your tests today—then upgrade to API 2027‑01 with confidence.

    Need help with the migration or want a code review? Drop a comment below or reach out on the Shopify Community Forums. Happy coding!

    Tags
    Sources

    Related Articles

    CurrentEntryChange Now Returns the Previous Page – What Developers Need to Know

    CurrentEntryChange Now Returns the Previous Page – What Developers Need to Know

    Starting with API version 2027-01, the Navigation API’s currententrychange event now reports the page a customer left instead of the page they navigated to. Learn how this breaking change impacts full‑page account extensions and how to update your code before the upgrade.

    October 31, 20263 min
    UI Extensions Can Now Host Unlimited Locale Files—No More 256 KB Ceiling

    UI Extensions Can Now Host Unlimited Locale Files—No More 256 KB Ceiling

    Shopify has removed the 256 KB combined size limit for UI extension locale files, letting developers add more languages without trimming translations. Learn what changed, who it affects, and how to expand your extensions instantly.

    October 30, 20264 min
    Trusted Vault Origin Signal Empowers Credit Card Payments in Shopify Payments Apps

    Trusted Vault Origin Signal Empowers Credit Card Payments in Shopify Payments Apps

    Shopify’s new trusted_vault_origin flag gives payment app developers a reliable way to handle missing CVV for vaulted cards. Learn what changed, who’s affected, and how to update your integration today.

    October 30, 20265 min
    Gift Card line_item_id Becomes Read‑Only in API 2027‑01 – What Developers Need to Know

    Gift Card line_item_id Becomes Read‑Only in API 2027‑01 – What Developers Need to Know

    Shopify’s REST Admin API 2027‑01 makes the Gift Card line_item_id field read‑only. Learn who is impacted, why it matters, and the exact steps to update your app before the upgrade.

    October 30, 20263 min