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
Look for any occurrence of includeRestOfWorld: true inside GraphQL mutations that use DiscountCountriesInput. Typical places are the discountCreate and discountUpdate mutations.
// 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
}
}
}
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).
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:
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!
