Skip to main content

New collection_id filter added to products query filters

As of the 2024-10 version of the GraphQL Admin API, a new filter, collection_id, has been added to the products query. This filter allows you to retrieve products that belong to a specific collection.

When using the collection_id filter, it can be combined with the following filters:

  • created_at
  • updated_at
  • published_at
  • gift_card
  • handle
  • combined_listing_role
  • product_type
  • status
  • title
  • vendor

For more details on all available attributes for the products query, visit the Shopify developer documentation on shopify.dev.

Example usage of the collection_id filter in a query:

{
  products(query: "collection_id:1234567890") {
    edges {
      node {
        id
        title
      }
    }
  }
}

This query retrieves products from the collection with the ID 1234567890.

Was this section helpful?