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

    Shop Eligibility Opens Up: New Requirements and What They Mean for Your Store

    Shop Eligibility Opens Up: New Requirements and What They Mean for Your Store

    Shop now welcomes stores beyond Shopify Payments, but with updated eligibility rules. Learn who’s affected, how to check status, and steps to qualify for traffic from the Shop app and Shop Campaigns.

    November 10, 20265 min
    Tailor Self‑Serve Returns & Cancellations per Market on Shopify

    Tailor Self‑Serve Returns & Cancellations per Market on Shopify

    Shopify now lets you enable or disable self‑serve returns and cancellations for each market individually, giving merchants granular control without extra migrations. Learn how to set it up, who it impacts, and what steps to take today.

    November 10, 20263 min
    New Shopify App Store Submission Rules: Build, Grow, Then Expand

    New Shopify App Store Submission Rules: Build, Grow, Then Expand

    Shopify has tightened App Store submission policies with new adoption thresholds, identity verification, escalating cooldowns, and automatic removal of unused apps. Discover who’s impacted and the exact steps to stay compliant.

    November 10, 20264 min
    Redesigned Partner Directory: How Shopify‑Powered Profiles Transform Your Business Visibility

    Redesigned Partner Directory: How Shopify‑Powered Profiles Transform Your Business Visibility

    Shopify’s Partner Directory has been revamped with data‑driven profiles that auto‑update from collaboration history. Learn what changed, who it impacts, and the exact steps partners and merchants must take to stay ahead.

    November 9, 20264 min