Add discount context, ordersCount limit, and metafield query support

8/12/2025, 12:00:46 AM

  1. The order‑count query (ordersCount) now accepts a limit argument (default 10,000) to cap how many results are returned. 2. The orders and ordersCount query arguments gained a new filter key: metafields.{namespace}.{key} allowing queries by metafield values. 3. Discount types now expose a context field (union DiscountContext) that replaces the previously used customerSelection. 4. The customerSelection field is deprecated with a note to use context instead. 5. New enum DiscountBuyerSelection and helper object DiscountBuyerSelectionAll were added to describe “all buyers” scenarios. 6. The Shop type’s orders field is deprecated in favor of using the root orders query, so developers should migrate queries accordingly. 7. The description of the Shop.orders field still mirrors the root query but will be removed in a future release. 8. All updated descriptions remain unchanged but the added filters and fields should be considered in API calls.

Query Changes

🔄 Modified Queries (2)

orders

Returns a list of orders placed in the store, including data such as order status, customer, and line item details.
Use the orders query to build reports, analyze sales performance, or automate fulfillment workflows. The orders query supports pagination,
sorting, and filtering.

~ Modified argument: query
ordersCount

Returns the count of orders for the given shop. Limited to a maximum of 10000 by default.

~ Modified argument: query

Type Changes

➕ Added Types (4)

📋DiscountBuyerSelection➕ AddedENUM

All buyers are eligible for the discount.

Values: ALL
🏗️DiscountBuyerSelectionAll➕ AddedOBJECT

All buyers are eligible for the discount.

Fields: all
🔀DiscountContext➕ AddedUNION

The type used to define which buyers can use the discount.

📥DiscountContextInput➕ AddedINPUT_OBJECT

The input fields for the buyers who can use this discount.

🔄 Modified Types (11)

🏗️Company🔄 Modified
🔄 Field modified: orders
🏗️Customer🔄 Modified
🔄 Field modified: orders
🏗️DiscountAutomaticApp🔄 Modified
Field added: context

The context defining which buyers can use the discount.

🏗️DiscountAutomaticBasic🔄 Modified
Field added: context

The context defining which buyers can use the discount.

🏗️DiscountAutomaticBxgy🔄 Modified
Field added: context

The context defining which buyers can use the discount.

🏗️DiscountAutomaticFreeShipping🔄 Modified
Field added: context

The context defining which buyers can use the discount.

🏗️DiscountCodeApp🔄 Modified
Field added: context

The context defining which buyers can use the discount.

🔄 Field modified: customerSelection
🏗️DiscountCodeBasic🔄 Modified
Field added: context

The context defining which buyers can use the discount.

🔄 Field modified: customerSelection
🏗️DiscountCodeBxgy🔄 Modified
Field added: context

The context defining which buyers can use the discount.

🔄 Field modified: customerSelection
🏗️DiscountCodeFreeShipping🔄 Modified
Field added: context

The context defining which buyers can use the discount.

🔄 Field modified: customerSelection
🏗️Shop🔄 Modified
🔄 Field modified: orders