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 Transparency: The New Store Activity Log Lets You Track Every Change

    Unlock Transparency: The New Store Activity Log Lets You Track Every Change

    Shopify’s rebuilt Store activity log centralizes every modification—from products to payments—into one searchable timeline. Learn what’s new, who can see it, and how merchants and developers can act today.

    November 13, 20264 min
    Custom Draft Order Discounts Now Respect Presentment Currency

    Custom Draft Order Discounts Now Respect Presentment Currency

    Shopify now calculates custom draft‑order discounts in the draft’s presentment currency instead of the shop’s default. Learn what this means for merchants, developers, and how to update your workflow today.

    November 13, 20264 min
    Checkout Functions Get Smarter: `cart.deliverableLine` Now Includes Cost Modeling and Direct Cart Line Links

    Checkout Functions Get Smarter: `cart.deliverableLine` Now Includes Cost Modeling and Direct Cart Line Links

    Shopify’s latest checkout function update adds cost modeling to `cart.deliverableLine` inputs and ties them directly to their originating cart lines. Learn what this means for developers, how to adjust your code, and the best practices to stay compliant.

    November 13, 20264 min
    Case-Insensitive Market Metafields: What the 2027-01 Storefront API Change Means for Your Store

    Case-Insensitive Market Metafields: What the 2027-01 Storefront API Change Means for Your Store

    Shopify's Storefront API 2027-01 now matches Market.metafields keys case‑insensitively. Learn why this matters, who is affected, and how to update your apps and custom storefronts before the change breaks your logic.

    November 13, 20264 min