Can't filtering data using Storefront API and graphql version unstable

will_dzoan
New Member
1 0 0
I'm testing graphql query on Shopify Graphql Explorer for filtering products on Storefront API.

My query is like this:

 

query ProductType { collectionByHandle(handle: "pants") { handle products(first: 10, filters: { productType: "pants" }) { edges { node { handle productType } } } } }

 

And this is the result:

 

{ "data": { "collectionByHandle": { "handle": "pants", "products": { "edges": [ { "node": { "handle": "my-test-product-pants", "productType": "pants" } }, { "node": { "handle": "pleated-straight-pants-mens-fashion-elastic-waist-casual-pants-men-streetwear-loose-ice-silk-trousers-mens-wide-leg-pants-s-2xl", "productType": "" } }, ...

 

Basically, the result has all the products that I have for that collection. Can anybody help me with this? This is literally the code I got from shopify website

Reply 1 (1)
c10s
Shopify Partner
65 12 13

I'm having the same issue with my store as well. I guess it is still an unstable endpoint still 🤷‍♂️