Bug? productCreate mutation - error updating metafield

UPDATE: I think I found the reason for the error. From my previous post about “INTERNAL_ERROR”, it seems if you omit the namespace when creating an app-data metafield, the namespace used is

app--{appId}

NOT

app--{appId}--{appTitle}

I was assuming the latter, so my call was attempting to update a metafield that did not exist. The metafields for key1 and key2 where created with the $app:{appTitle} syntax, hence why those calls worked correctly.

SUMMARY: If you’re not concerned about the naming convention of app-data metafields, then you can omit the namespace from the metafieldsSet mutation. However, if you are concerned about the naming convention, then use the $app:{appTitle} syntax in your mutation.

Hope this helps other developers!

1 Like