Skip to content

Shopify Dude Fix

Shopify automaticDiscounts Query Removed in 2027-01? Switch to discountNodes

Admin GraphQL 2027-01 removes automaticDiscounts. Migrate to discountNodes with method:automatic, update fragments, and compare results before upgrading.

Quick answer: The automaticDiscounts Admin GraphQL query is removed in API 2027-01. Replace it with discountNodes(first: ..., query: "method:automatic"), then read each discount through the node’s discount field. Do not migrate to the also-deprecated automaticDiscountNodes.
On this page

Why this breaks

On September 18, 2026 Shopify announced the removal for the January 2027 API version. A request that includes a removed GraphQL field fails validation; it does not return an empty list. The old DiscountAutomaticConnection and DiscountAutomaticEdge types disappear too. Existing integrations pinned to supported 2026-10 or earlier versions are not immediately broken, but a schema upgrade can break promotion dashboards, scheduled audits and app syncs.

What to change

Search GraphQL documents, persisted queries, generated clients and tests for automaticDiscounts. Move the inline fragments beneath DiscountNode.discount. Keep pagination and deliberately preserve any existing status or date filtering. Shopify’s unified discountNodes search supports method:automatic and other discount filters, so verify the returned set rather than assuming identical ordering.

GraphQL before and after

# Before (2026-10 and earlier)
query {
  automaticDiscounts(first: 10) {
    nodes {
      ... on DiscountAutomaticBxgy { title status }
    }
  }
}

# After (2027-01)
query {
  discountNodes(first: 10, query: "method:automatic") {
    nodes {
      id
      discount {
        ... on DiscountAutomaticBxgy { title status }
      }
    }
  }
}

For a production promotion switch, query the node and the underlying discount separately from storefront eligibility. An active discount record does not prove every cart qualifies, and a read-only query migration does not replace the actual discount Function or activation logic.

Common misunderstanding: Changing automaticDiscounts to automaticDiscountNodes looks like a small fix, but Shopify has deprecated that alternative too. Use the unified query to avoid a second migration.

How to test this

  1. Capture the automatic discount IDs, titles and statuses from a known 2026-10 shop.
  2. Run the new query against a development store on 2027-01 and confirm the same eligible automatic discounts appear.
  3. Test zero results, pagination, mixed code and automatic discounts, and a paused discount.
  4. Regenerate GraphQL types and compile every job or app consuming the old connection types.
  5. Test a qualifying and non-qualifying cart separately to ensure storefront discount behavior was not confused with the query migration.