← All articles
Shopify API 2027-0118 September 2026

automaticDiscounts removed in Shopify API 2027-01

With Shopify API version 2027-01, the automaticDiscounts query is removed and now returns a validation error. Here's how to migrate correctly to discountNodes and avoid a double migration.

What changes with API version 2027-01

Upgrading the Shopify API version without checking for deprecated queries is one of the most common and costly mistakes for teams managing custom discount integrations. With the release of API version 2027-01, the automaticDiscounts query no longer exists in Shopify's GraphQL Admin API.

The behavior isn't a simple empty field: the call returns a validation error. This means any integration relying on this query stops working immediately after the upgrade, with no grace period.

Types removed alongside the query

Along with the query, the following types are also removed:

  • DiscountAutomaticConnection
  • DiscountAutomaticEdge

If your project regenerates GraphQL types against version 2027-01 without first migrating the code, the build breaks. This affects both server-side integrations and any TypeScript type generators based on the Admin API schema.

Why you should skip automaticDiscountNodes

A point often misunderstood in this migration concerns automaticDiscountNodes. This query is also already deprecated, so migrating to it would mean facing a second migration cycle in the near future.

The correct move is to jump straight to discountNodes, applying the query: "method:automatic" filter. This approach closes the loop in a single step, avoiding duplicate work once automaticDiscountNodes is also removed in a future version.

The advantage of discountNodes

discountNodes unifies the reading of automatic and code-based discounts into a single query, with consistent filter syntax. This simplifies client code, reduces duplicated fetch logic, and aligns the integration with the most recent data model exposed by the Admin API.

Migration checklist before moving to 2027-01

Before performing the upgrade, it's worth following a few practical steps:

  • Search for automaticDiscounts throughout the codebase, including auto-generated types and any reference to DiscountAutomaticConnection or DiscountAutomaticEdge
  • Replace calls with discountNodes(first: 10, query: "method:automatic")
  • Move inline fragments one level deeper, applying them on the discount field of DiscountNode
  • Regenerate GraphQL types against version 2027-01
  • Test on a development store, comparing results against those produced by version 2026-10

This cross-version verification process is essential to ensure that business logic depending on automatic discounts continues to behave identically after the migration.

What happens if you don't migrate right away

Versions 2026-10 and earlier continue to work normally as long as they remain supported under Shopify's release cycle. If you can't complete the migration immediately, the safest approach is to pin the API version used by your integration and plan the migration work for later, avoiding any automatic or accidental upgrade to 2027-01.

A check to run now

Anyone managing custom Shopify discount integrations should check right away for the presence of automaticDiscounts in their code, even in projects considered stable or rarely touched recently. A timely audit prevents production downtime when the forced upgrade arrives.

For those developing or maintaining Shopify integrations who want to estimate the cost of a targeted migration effort, you can check the Shopify developer pricing page to gauge the time and budget required.

FAQ

Frequently Asked Questions

The query doesn't return empty data but generates a validation error, so any call based on automaticDiscounts fails immediately after updating to API version 2027-01.

No, automaticDiscountNodes is already deprecated. It's better to migrate directly to discountNodes with the query: "method:automatic" filter to avoid a second migration cycle in the near future.

Yes, versions 2026-10 and earlier continue to work as long as they're supported. In that case, it's advisable to pin the API version you're using and plan the migration for later.