Why includeRestOfWorld:true Breaks in API 2027-01 and How to Fix It

Starting with GraphQL Admin API version 2027-01, setting DiscountCountriesInput.includeRestOfWorld to true triggers a BAD_REQUEST error. Learn who’s affected, why it matters, and step‑by‑step how to update your apps before the upgrade.

Why includeRestOfWorld:true Breaks in API 2027-01 and How to Fix It
6 sections

If you build or maintain Shopify apps that create or modify shipping discounts, the newest GraphQL Admin API version (2027-01) brings a breaking change you need to address right now. The legacy field DiscountCountriesInput.includeRestOfWorld, once set to true, now returns a BAD_REQUEST error. In this post we’ll break down exactly what changed, who needs to act, and provide a clear migration path with code examples so your discounts keep working flawlessly.

What Changed in API 2027-01

Starting with version 2027-01, the includeRestOfWorld field is still present in the schema but is effectively dead. When you send includeRestOfWorld: true the API responds with: 

includeRestOfWorld is no longer supported. Specify the applicable country codes explicitly.

Passing false or null behaves as before (a no‑op). The real shift is that Shopify is retiring the “Rest of World” shipping‑zone concept in favor of explicit, market‑driven country lists. From now on you must enumerate every country where a discount should apply via the add array.

Who Is Affected

Any public or private app that sends includeRestOfWorld: true in a discount‑creation or discount‑update mutation while targeting API version 2027-01 or later will receive a BAD_REQUEST error. This does NOT impact apps that only send false, null, or omit the field, nor does it affect stores still using API versions 2026-10 or earlier. However, public apps that request the “unstable” version automatically inherit the new behavior as soon as it is deployed, so even early‑adopters must prepare.

Why It Matters

The “Rest of World” bucket was a catch‑all for any country not explicitly listed in a shipping zone. Shopify is moving toward a market‑driven model where each country’s shipping rules are defined individually. By forcing developers to list every eligible country, Shopify ensures that discount eligibility aligns with the new shipping architecture and prevents apps from relying on a concept that will eventually disappear from the API altogether.

How to Update Your Mutations

  • Search Your Codebase
  • Look for any occurrence of includeRestOfWorld: true inside GraphQL mutations that use DiscountCountriesInput. Typical places are the discountCreate and discountUpdate mutations.

  • Replace with an Explicit Country List
  • // Before – works on 2026-10 and earlier

    mutation {

    discountCreate(input: {

    countries: {

    add: ["CA", "US"]

    includeRestOfWorld: true

    }

    ...

    }) {

    discount {

    id

    }

    }

    }

    // After – required on 2027-01 and later

    mutation {

    discountCreate(input: {

    countries: {

    add: ["CA", "US", "AU", "BR", "JP"]

    }

    ...

    }) {

    discount {

    id

    }

    }

    }

  • Determine the Full List of Countries
  • Use your business logic to compile every country where the discount should apply. You can pull the ISO‑3166‑1 alpha‑2 codes from Shopify’s Country resource or from your own configuration. If the discount truly is “global,” you’ll now need to list every country supported by Shopify (currently around 250).

  • Remove the Field Entirely
  • Once you’ve replaced the flag with a full list, delete the includeRestOfWorld key from the input object. This future‑proofs your code for the eventual removal of the field from the schema.

    Testing & Migration Strategy

    *Create a Development Store* – Spin up a fresh dev store, enable the 2027-01 API version, and run your updated mutations against it. Verify that the discount appears with the exact country list you supplied.

    *Version Fallback* – If you cannot migrate immediately, keep using API version 2026-10 or any earlier version that still honors includeRestOfWorld:true. Remember, this is only a temporary bridge; you’ll need to switch before the older version is retired (Shopify typically supports a version for ~12 months).

    *Automated Checks* – Add a unit‑test or CI step that fails if the string includeRestOfWorld:true appears in any GraphQL request payload destined for version 2027-01 or later. This catches regressions before they reach production.

    Bottom Line & Call to Action

    The 2027-01 release is a clear signal that Shopify’s “Rest of World” shipping bucket is on its way out. Updating your discount‑creation logic now prevents unexpected BAD_REQUEST errors, aligns your app with Shopify’s market‑driven shipping model, and keeps your merchants’ checkout experience smooth.

    ✅ Action Checklist:

  • Search for includeRestOfWorld:true in your code.
  • Replace it with a complete add array of country codes.
  • Remove the field entirely.
  • Test against API 2027-01 in a dev store.
  • Deploy the changes before your next release cycle.
  • If you need help auditing your mutations or building a dynamic country‑list generator, reach out in the Shopify Community forums or drop a comment below. Stay ahead of the curve, and happy coding!

    Tags
    Sources

    Related Articles

    Unlock Better Profit Insights: New Shipping & Duty Data in Shopify Analytics

    Unlock Better Profit Insights: New Shipping & Duty Data in Shopify Analytics

    Shopify now delivers richer, real‑time shipping and duty data in Analytics, refining profit margins and custom reports. Learn what changed, who’s affected, and how to adapt your store and code.

    September 23, 20265 min
    Events Subscription Query Complexity Limit Drops to 100 Points – What Developers Need to Know

    Events Subscription Query Complexity Limit Drops to 100 Points – What Developers Need to Know

    Shopify is lowering the Events subscription query complexity limit from 250 to 100 points. Learn what this means for your apps, how to audit and refactor subscriptions, and the exact steps to stay compliant.

    September 22, 20265 min
    Polaris CDN 1.1 Goes Stable — New Components, Props, and What It Means for Your Shopify Apps

    Polaris CDN 1.1 Goes Stable — New Components, Props, and What It Means for Your Shopify Apps

    Polaris CDN 1.1 is now stable, bringing new UI components, props, and bug fixes. Learn what changed, who it affects, and how to leverage or pin the version in your Shopify apps.

    September 22, 20264 min
    Mastering Shopify Rollouts: Granular Controls for Launches, Events, and Experiments

    Mastering Shopify Rollouts: Granular Controls for Launches, Events, and Experiments

    Shopify’s new Rollouts UI gives merchants and developers precise tools to schedule launches, run temporary events, and test changes with traffic‑percentage controls. Learn what changed, who it affects, and how to implement the new workflow today.

    September 22, 20265 min