Please Include handle search feature on GraphSQL

catedev
New Member
5 0 0

Untitled.png

 

Hello Shopify Developer can you please add features on your graphsql to enable search product by handle? I want to query multiple handle rather using single productByHandle

0 Likes
HunkyBill
Shopify Expert
4372 36 464

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.

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
catedev
New Member
5 0 0

In my case i don't have the ids of the products.  Only the handle that's why i want to search products by handle. So my sample query like query: "handle: test-1 OR test-2  OR test-3 etc." which display 3 products in one query rather than querying it 3x by producthandle Function.

0 Likes
HunkyBill
Shopify Expert
4372 36 464

You're good! You have a handle. You have a query productByHandle! Just use that for as many handles as you have. There is no point in making complex code when simple will do the trick!

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
catedev
New Member
5 0 0

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 🙏 

0 Likes
HunkyBill
Shopify Expert
4372 36 464

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.

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
catedev
New Member
5 0 0

I intent to use it public apps and bulk products it not possible on my case.  

0 Likes
HunkyBill
Shopify Expert
4372 36 464

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?

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
catedev
New Member
5 0 0

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.

 

0 Likes