Skip to main content

DraftOrderDiscountNotAppliedWarning.priceRule removed in GraphQL Admin API 2026-10

Starting with GraphQL Admin API version 2026-10, the deprecated priceRule field on the DraftOrderDiscountNotAppliedWarning object is removed.

This is a breaking change for apps that query priceRule on DraftOrderDiscountNotAppliedWarning, which is returned in draft order discount warnings from mutations such as draftOrderCalculate, draftOrderCreate, and draftOrderUpdate. If your app selects priceRule in these responses, you must update those queries before upgrading to 2026-10.

The warning already exposes the relevant discount data directly, so you no longer need the legacy priceRule object. Use the following fields instead:

  • discountTitle — the title of the discount that couldn’t be applied. Use this instead of priceRule { title }.
  • discountCode — the code of the discount that couldn’t be applied. Use this instead of priceRule { discountCodes { nodes { code } } }.

Update any query that reads priceRule from this warning to select discountTitle and discountCode instead.

Before:

... on DraftOrderDiscountNotAppliedWarning {
priceRule {
title
discountCodes(first: 1) {
nodes {
code
}
}
}
}

After:

... on DraftOrderDiscountNotAppliedWarning {
discountTitle
discountCode
}

DraftOrderDiscountNotAppliedWarning was the only place where the legacy PriceRule object was reachable from the public GraphQL Admin API. As a result, removing priceRule also removes the PriceRule object and its related types from the public schema in 2026-10 and later.

Older supported API versions continue to expose priceRule on DraftOrderDiscountNotAppliedWarning until those versions reach end of life.

Learn more about the DraftOrderDiscountNotAppliedWarning object.

Was this section helpful?