Enhancing Product Filtering Capabilities in GraphQL API

Dear Shopify Development Team,

I’m writing to suggest a potential improvement to the Shopify GraphQL Admin API. Currently, filtering products within a collection by specific criteria, such as status, requires additional client-side processing or the use of smart collections.

I believe that adding a query parameter to the products field within the collection node would significantly enhance the flexibility and efficiency of product filtering. This would allow developers to directly filter products based on various attributes, including status, title, vendor, and more, within a single GraphQL query.

For Example

query {
collection(handle: “my-collection”) {
products(first: 10, query: “status:active”) {
edges {
node {
id
title
handle
status
}
}
}
}
}

This feature would streamline the development process, reduce API requests, and provide more granular control over product data retrieval.

Thank you for considering this feature request. We look forward to seeing the continued evolution of the Shopify GraphQL API.

Sincerely,
Mo_Gaming
mohsinali033400@gmail.com