When querying products within a collection, you’re not able to use the query argument to filter products further. This is intentional, because the queries can be extremely expensive.
You’ll find if you remove the query argument from products so it’s just (first:15) this will succeed.
I want to filter products with a collection id. Let me know if any other solution using graphQL query. I found query in your document but the query is not working.
{
products(first:5, query:"collection_type:t-shirt"){
edges{
node{
id
}
}
}
}
When looking at our documentation for QueryRoot.products, I’m only seeing the following fields documented for use under query (collection_type isn’t there) :
barcode
created_at
delivery_profile_id
error_feedback
gift_card
inventory_total
out_of_stock_somewhere
product_type
published_status
sku
tag
title
updated_at
vendor
Or is your post only a portion of your GraphQL query? Query should not be documented as part of collection.products, I’ve logged an issue to remove that as it doesn’t work and isn’t meant to be documented there. It will only work when looking up products directly, not within a collection.