A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
i am having trouble getting collection in respect to metafields key or value
query GetCollections{
collections(first:20, query: "metafields:namespace.key='parent'" ){
nodes{
id
handle
title
metafields(first:10){
nodes{
key
value
namespace
}
}
}
}
}
Hey @AmitIntuji ,
Looking over our documentation here, `metafields` is not an available filter query on collections.
You can see the available filters here: https://shopify.dev/docs/api/admin-graphql/2024-01/queries/collections#argument-collections-query
The unstable API version does have a metafields query. There's an example here on retrieving metafields within a namespace.
Hope that helps!
- Kyle G.
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog