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.
(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).