Conversations about creating, managing, and using metafields to store and retrieve custom data for apps and themes.
Hello guys! I'm trying to create a new metafield into the SHOP resource using GraphQP. I found this topic: https://help.shopify.com/en/api/guides/metafields/admin-api-metafields#creating-metafields, but it is creating into the product resource.
I've been using the Shopify GraphiQL App to testing my GraphQL codes and learning more about it reading the documentation. Unfortunately, I can't find anything related to my doubt.
In general, I'm trying to save some customized data through the private app and I'll use this data globally in my StoreFront.
Thank you! 😉
Solved! Go to the solution
This is an accepted solution.
As I understand it there is currently no GraphQL support for creating shop metafields, only on products. To make a store metafield you would need to utilize the API, documentation here https://help.shopify.com/en/api/reference/metafield#create-2019-10, and POST. Making storefront accessible metafields is a different beast with the documentation available here https://help.shopify.com/en/api/guides/metafields/storefront-api-metafields.
This is an accepted solution.
As I understand it there is currently no GraphQL support for creating shop metafields, only on products. To make a store metafield you would need to utilize the API, documentation here https://help.shopify.com/en/api/reference/metafield#create-2019-10, and POST. Making storefront accessible metafields is a different beast with the documentation available here https://help.shopify.com/en/api/guides/metafields/storefront-api-metafields.
Yes! As I imagined... Thank you so much!
(Today still no GraphQL mutation for Shop metafields - August 2020. Use POST /admin/api/2020-07/metafields.json as detailed in https://shopify.dev/docs/admin-api/rest/reference/metafield).
Public Apps | Theme customization & App development
- Was my reply useful? Like it to let me know!
- Did I answer your question? Please mark as Accepted Solution.
- Need more help? Contact us.
When do you think mutations for Shop metafields will be available for GraphQL?