Product Metafields don't update with GraphiQL

Solved
Shopify Partner
871 76 189

So if you go into the Shopify web admin for this shop and go into your logged-in user account. See what permissions are listed there. If you are using the Shopify GraphiQL app then the permissions flow from the logged-in user. 

0 Likes
New Member
5 0 0

It's the main root account.

0 Likes
Shopify Partner
871 76 189

Mind providing a full screen shot of the GraphiQL app query that's failing? 

0 Likes
New Member
5 0 0

Capture d’écran 2020-11-28 à 2.10.00 PM.jpg

0 Likes
Shopify Partner
871 76 189

I just ran this for a ProductVariantUpdate using the GraphiQL app in my test store. It worked fine. See below. I didn't have an exiting product with a defined metafield so it was against a variant child, but seemed to go okay. And you've verified that this particular Shopify account has the appropriate permissions? I know you said that it's the root account, but double-checking might not hurt!

 

Untitled.jpg 

0 Likes
New Member
5 0 0

Well, you were right! Thx for insisting.

I wasn't able to review full rights of the application (or at least they were misleading) but eventually I reinstalled it and it worked.

Side note: it seems to me that the example here: https://shopify.dev/tutorials/manage-metafields-with-graphql-admin-api#updating-the-owning-resource

Lack with the field

"id": "gid://shopify/Metafield/XXX",         

 

Otherwise you get a:  "message": "Key must be unique within this namespace on this resource"

0 Likes