marketUpdate Now Respects enabled:false: Drafting Markets with Conditions Made Explicit

Shopify’s Admin GraphQL API now treats enabled:false as a draft status for condition‑backed markets. Learn what changed, who’s affected, and how to update your apps to avoid silent failures.

marketUpdate Now Respects enabled:false: Drafting Markets with Conditions Made Explicit
7 sections

If you’ve built apps that manage Shopify markets, the recent Developer Changelog entry about marketUpdate is a must‑read. Starting with the latest API versions, the mutation now honors enabled: false for markets that rely on conditions, automatically treating the request as a draft (status: DRAFT). This change fixes a silent‑failure bug that could leave merchants unaware that a market remained active.

What Changed in marketUpdate

Previously, sending enabled: false without also providing a status field was ignored for condition‑backed markets. The market stayed in its current state, even though the API reported a successful call. Now the mutation interprets that input as status: DRAFT when no explicit status is supplied. In practice, the request either changes the market’s status to draft or returns one of two new validation errors:

  • MUST_HAVE_AT_LEAST_ONE_ACTIVE_REGION_MARKET – You cannot draft the last active region market for the shop.
  • SUBDIVISION_MARKET_REQUIRES_COUNTRY_COVERAGE – A country market must cover any active subdivision market that depends on it.
  • Who Needs to Pay Attention

    The impact is squarely on developers and app owners who programmatically update markets. If your app sends enabled: false without a status field—especially when converting a market to use conditions—you’ll now see real draft behavior or validation errors. Merchants who rely on apps for market management will notice the difference when a market they expect to be inactive remains active, or when an update suddenly fails.

    Why This Fix Matters

    Silent failures are a nightmare for both developers and store owners. Before the fix, an app could “think” it had drafted a market while the UI still displayed it as live, leading to inventory or tax mis‑configurations. By enforcing the draft status—or surfacing clear errors—Shopify ensures data integrity and gives developers a reliable signal to handle outcomes appropriately.

    Action Steps for Developers

  • Audit Your marketUpdate Calls – Search your codebase for any mutation that includes enabled: false without also providing status. 2. Replace with Explicit Status – When you intend to draft a market, use status: DRAFT instead of enabled: false. 3. Remove Unintended Flags – If drafting isn’t your goal, simply omit the enabled field; don’t rely on it being ignored. 4. Handle userErrors Rigorously – After each mutation, inspect the userErrors array. If errors appear, abort further processing because no changes (including other fields) were saved. 5. Test Across API Versions – The change applies to every supported Admin GraphQL version, including the unstable release, so run integration tests against the latest version you ship.
  • Example: Updating a Market Correctly

    graphql

    mutation {

    marketUpdate(id: "gid://shopify/Market/1234567890", input: {

    status: DRAFT

    }) {

    market {

    id

    status

    }

    userErrors {

    field

    message

    }

    }

    }

    In this example the mutation explicitly sets the market to draft. If the shop would be left without any active region market, the response includes the MUST_HAVE_AT_LEAST_ONE_ACTIVE_REGION_MARKET error, and no fields are updated.

    Handling Validation Errors

    When you receive a userErrors payload, treat the entire operation as failed. Log the error, surface a clear message to the merchant (e.g., “You must keep at least one active region market”), and avoid any optimistic UI updates that assume success. Remember that the mutation is atomic—if validation fails, none of the supplied changes are persisted, even those unrelated to the status field.

    Conclusion & Next Steps

    The marketUpdate enhancement removes a silent‑failure edge case and aligns the API with the intuitive expectation that enabled: false drafts a market. By updating your mutation payloads, adding robust error handling, and re‑testing your integrations, you’ll keep merchants’ market configurations reliable and avoid unexpected downtimes. Need help auditing your app or implementing the new pattern? Reach out to our developer support team or drop a comment below—we’re happy to assist!

    Tags
    Sources

    Related Articles

    Pull Your App’s Logs Directly in the Terminal with Shopify CLI 5.2

    Pull Your App’s Logs Directly in the Terminal with Shopify CLI 5.2

    Shopify CLI 5.2 adds a powerful shopify app logs command that lets developers and merchants fetch historical webhook, API, and Function logs right from their terminal. Learn what changed, who it affects, and how to start using it today.

    December 2, 20263 min
    Shop Update Webhooks Now Reveal Market‑Driven Shipping Status

    Shop Update Webhooks Now Reveal Market‑Driven Shipping Status

    Shopify’s latest webhook update adds market‑driven shipping status to shop update events, giving developers and merchants richer order fulfillment data. Learn what changed, who needs to act, and how to adapt your integrations today.

    December 2, 20264 min
    Ship and Pickup Together: Storefront API Cart Delivery Groups Now Support Pickup

    Ship and Pickup Together: Storefront API Cart Delivery Groups Now Support Pickup

    Shopify’s Storefront API now returns multiple delivery groups—including pickup—in cart queries, aligning cart data with checkout selections. Developers must update their integrations to handle split shipping and pickup groups and avoid broken experiences.

    December 2, 20265 min
    displayName No Longer Shows Unapproved Emails or Phones – What Developers Need to Know

    displayName No Longer Shows Unapproved Emails or Phones – What Developers Need to Know

    Shopify’s latest API change hides customer emails and phone numbers in the displayName field unless your app has explicit permission. Learn who is affected, how the change works, and the exact steps to keep your integrations running smoothly.

    December 1, 20264 min