-
I am hoping to use only the products query to fetch my products but I noticed when using pagination it becomes tricky to filter by category on my ui... I need to use the graphql where field to ask for products(page: 1, limit: 8, where: {category: "birthday"}) which made sense to me but it doesn't seem to work. I can use a workaround by using an entirely different query (the categories query) to get the products from that but it seems like a really inefficient workaround. Is it possible to get products of a particular category using the products query and a where clause? Edit: I also just noticed that if I try to use the categoryBySlug query I can't add pagination or sorts to the query... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @jdslomka There is a current limitation to filter products by category with graphql using the products query. I've passed this feedback on to the team so we can improve this. The workaround would be to use the categories query that you mentioned. |
Beta Was this translation helpful? Give feedback.
Hi @jdslomka There is a current limitation to filter products by category with graphql using the products query. I've passed this feedback on to the team so we can improve this. The workaround would be to use the categories query that you mentioned.