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

    Navigating Shopify’s New UI Extension Bundle Size Exception Process
    Platform Updates

    Navigating Shopify’s New UI Extension Bundle Size Exception Process

    Shopify now caps UI extension bundles at 64 KB (128 KB for full‑page account extensions) and offers a formal exception request. Learn who’s affected, how to optimize, and the exact steps to submit a bundle size exception before the October 2026 deadline.

    September 17, 20264 min
    Unlocking Market Hierarchies: New GraphQL Admin API Fields for 2026-10
    Platform Updates

    Unlocking Market Hierarchies: New GraphQL Admin API Fields for 2026-10

    Shopify’s 2026-10 API now lets apps query parent‑child market relationships directly. Learn what changed, who it affects, and how to integrate the new marketRelationships query with actionable code examples.

    September 17, 20264 min
    Mark Unreceived Stock with the New CANCELED Receive Action in Shopify’s Inventory Shipments API
    Platform Updates

    Mark Unreceived Stock with the New CANCELED Receive Action in Shopify’s Inventory Shipments API

    Shopify’s 2026-10 API adds a CANCELED receive action for inventory shipments, letting apps record units that will never arrive. Learn what changed, who it affects, and how to implement the new fields, enum, and webhook updates.

    September 17, 20264 min
    POS UI Extensions Lose session.currentSession.staffMemberId – What Developers Need to Update for 2026‑10
    Platform Updates

    POS UI Extensions Lose session.currentSession.staffMemberId – What Developers Need to Update for 2026‑10

    The static session.currentSession.staffMemberId field is removed in API version 2026‑10. Learn how to switch to the new session.staffMember signal, update your code, and keep POS extensions running smoothly.

    September 17, 20263 min