I’m currently working on querying Shopify collections using the GraphQL Storefront API. I’m trying to retrieve collections where a specific metafield (filtering_category) has a value of ‘Theme’.
However, despite having collections with filtering_category set to ‘Theme’, the query is not returning any results. Could you please advise if there’s anything specific I should check or adjust in my query to ensure it correctly filters based on metafields?
Hi folks - just following up here. You are correct @Eric-HAN - at the moment, we don’t support query filtering for metafields on the Storefront API’s collection object. My understanding is that at the moment, the only way to query those values directly on collections themselves is through Liquid: https://community.shopify.com/post/1824088 .
Definitely understand that this isn’t the most ideal though, so I’m going to put through a note up to our developers to consider adding metafield query filtering on collections as a possible feature in a future release.
I can’t guarantee anything on my end, but did just want to confirm that I’ll send that feature request up to our developers right away here.
Thanks for the clarification there - really appreciated!
Thanks for the quick follow-up and for confirming that you’ll send the feature request to the developers—much appreciated!
In addition to the request for metafield query filtering on collections, it would be incredibly useful if we could also have a way to filter collections based on specific metafields or similar criteria. This functionality would greatly enhance our ability to create more dynamic and tailored storefront experiences.
Thanks again for your support and for considering this additional request!