Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
I'm trying to query a product based on a metafield value through a collection since this is the only possible way at the moment:
I have written the query below:
query Collection { collection(id: "gid://shopify/Collection/429854163254") { handle products(first: 30, filters: { productMetafield: { namespace: "mangento", key: "ceid", value: "Round"} }) { edges { node { handle title } } } } }
And it returns this error:
Field 'products' doesn't accept argument 'filters'
I have enabled Search & Discovery app, as i read somewhere that it is required but the error still appears.
Honestly the documentation is quiet confusing for such simple things, a little help would be amazingly appreciated.
Thanks and regards.
Solved! Go to the solution
This is an accepted solution.
Changing endpoint to: https://{{ store }}.myshopify.com/api/{{api_version}}/graphql.json
From: https://{{ store }}.myshopify.com/admin/api/graphql.json
Made it work.
This is an accepted solution.
Changing endpoint to: https://{{ store }}.myshopify.com/api/{{api_version}}/graphql.json
From: https://{{ store }}.myshopify.com/admin/api/graphql.json
Made it work.
Does anyone know if this will ever be an option to perform that search through the Admin API?