← News

News

Setting includeRestOfWorld to true returns an error in API version 2027-01

Source: Shopify Dev Changelog

  • shopify

Shopify GraphQL Admin API to Reject includeRestOfWorld in Version 2027-01

What Changed

Starting with GraphQL Admin API version 2027-01, setting the deprecated includeRestOfWorld field to true within DiscountCountriesInput will return a BAD_REQUEST error. The field itself remains part of the DiscountCountriesInput type, but its previous functionality is being removed. Apps that attempt to pass true for this field will receive an error message indicating that includeRestOfWorld is no longer supported for this purpose.

This change only affects API version 2027-01 and later. Apps currently running on version 2026-10 or earlier will retain existing behavior for as long as those versions remain supported under Shopify’s API versioning schedule.

Why This Matters

Apps that use includeRestOfWorld: true to apply discounts across all countries not explicitly excluded will break when upgraded to 2027-01 without modification. This affects discount-related functionality built on the GraphQL Admin API, including third-party discount apps, custom discount logic in themes or checkout extensions, and any internal tooling that creates or manages country-based discount rules.

Developers who don’t proactively update their discount country logic before migrating API versions will encounter runtime errors in production, potentially disrupting discount creation or updates for merchants.

Practical Implications

Before upgrading to API version 2027-01, developers must audit any GraphQL mutations or queries that reference DiscountCountriesInput with includeRestOfWorld: true. The required fix is to explicitly list every applicable country using the add field instead of relying on the rest-of-world shorthand.

Teams should:

  • Search codebases for includeRestOfWorld usage in discount-related mutations
  • Replace true values with explicit country lists via add
  • Test discount creation flows against the 2027-01 API version in a development store before production upgrade
  • Review Shopify’s country code reference to ensure complete and accurate country lists

Apps maintaining support for multiple API versions should implement conditional logic to handle this behavioral difference across versions.

Read the full announcement →

Stay in the loop

Get Shopify ecosystem news and positioning insights for app founders.