When searhing for handle you are searching for an exact thing. Exactly one product will match one handle. So it makes no sense to have one handle return many products. If you want to type in part of a handle, and find all the products that match with that part of the handle being in their handle, just send your query to the search endpoint, and you'll maybe get back that result.
I think not a good solution to use product by handle for multiple products.
what if i have 200 product that want to display?
i need to request 200 queries in order to do that.
The query is supported by ids parameter to display multiple ids in single queries hope they can support handle parameter as well. Thank you.
ps: hopefully the Shopify dev team can see this thread. Thanks 🙏
If you want 200 products, you can always bulk download your products and then setup your own dtaa structure to search as you wish. That is probably the most efficient way to organize your problem since you only have access to handles.
You never explained how you happen to have handles for products but you have no access to their ID? Are you doing some kind of scraping? So I guess you're limited to whatever Storefront API offers you right?
Yes, the reason i only have handle is because i extract all the products link on collection page. Since there's no ID attribute on the collection template for every product i used the link to extract the handle. That's the reason why i would like to have handle search in products grapsql query.
User | Count |
---|---|
13 | |
12 | |
7 | |
4 | |
4 |