Skip to main content

New Collection model and APIs now available

The 2026-07 release replaces a collection’s single ruleSet with a multi-source model in the GraphQL Admin API. Each collection now has one or more CollectionSource objects that define typed inclusion and exclusion conditions, plus manual selections. Shopify Functions also gain variant-level collection membership fields on the ProductVariant type.

In API version 2026-07 and later, collections that use the new sources model are returned from collections queries, collection(id:) lookups, and other collection-returning fields. In earlier API versions, those same collections using new features are filtered out because the legacy ruleSet shape can’t represent them. Migrate to the 2026-07 API version to see and manage all collections in a shop.

These changes are non-breaking: deprecated members remain queryable in 2026-07 so you can migrate incrementally.

What’s new in the GraphQL Admin API

Collection sources and conditions

A new Collection.sources field returns one or more sources that back the collection. Two concrete types implement the new CollectionSource interface:

  • CollectionConditionsSource: includes products through typed inclusion conditions plus manual selections, and can optionally exclude products through exclusion conditions. Each source must target either PRODUCTS or VARIANTS, set by the new CollectionSourceTargetType enum.
  • CollectionSubCollectionsSource: pulls membership from one or more referenced collections.

Conditions are strongly typed: each condition uses a concrete type with a matching input type. Exclusion conditions include a subset of inclusion conditions or use a collection-based exclusion condition to target specific collections. Matching behavior for a set of conditions is controlled by the new CollectionConditionMatchType enum: ANY means at least one condition must match; ALL means every condition must match.

To define sources on a collection, collectionCreate and collectionUpdate now accept a collection argument typed as the new CollectionCreateInput or CollectionUpdateInput. CollectionUpdateInput exposes sourcesToCreate, sourcesToUpdate, and sourcesToDelete so you can update sources incrementally without replacing the entire collection definition.

Shareable app collection sources

A CollectionConditionsSource whose shareable field is true is owned by the calling app and can be linked to many of the shop’s collections. Use three new mutations to manage these shareable sources, and two new top-level queries to discover them:

To attach a shareable source to a specific collection, use CollectionShareableSourceInput { sourceId } inside the sources or sourcesToCreate field of the collection’s create or update input. Only the owning app can update or delete its shareable sources. Deleting a shareable source automatically detaches it from every collection that links to it.

Use shareable sources only when the same logic should be reused across multiple collections. If not, use collection mutations to create, update, or delete sources.

Other additions

Variant-level collection membership in Shopify Functions

The ProductVarianttype in Shopify Functions gains two new fields:

  • inAnyCollection(ids: [ID!]!): Boolean! returns true when the variant is in any of the specified collections.
  • inCollections(ids: [ID!]!): [CollectionMembership!]! returns per-collection membership for the variant.

A variant is a member of a collection when the variant itself is included in that collection. Existing Product.inAnyCollection and Product.inCollections continue to return true when the full product is in any of the specified collections, regardless of variant-level membership.

Deprecations

  • Collection.ruleSet is deprecated in favor of Collection.sources. Each ruleSet rule has an equivalent inclusion condition (for example, a tag rule maps to CollectionSourceInclusionConditionProductTag). Sub-collections, exclusion conditions, and multiple sources aren’t supported in the legacy shape.
  • collectionCreate(input:) and collectionUpdate(input:) are deprecated in favor of collectionCreate(collection:) and collectionUpdate(collection:). The legacy input argument continues to accept CollectionInput (with its ruleSet field), but only the new collection argument can define sources. If both arguments are supplied, the collection argument takes precedence.
  • If your app reads Collection.ruleSet or writes input.ruleSet, switch to Collection.sources and the new collection argument. The legacy shape can’t express multiple sources, exclusion conditions, or shareable sources, and collections that use those features are filtered out of pre-2026-07 query results.
  • If your Function needs variant-level collection membership, call inAnyCollection or inCollections on ProductVariant. The existing Product.inAnyCollection and Product.inCollections fields continue to return product-level membership.
Was this section helpful?