Conversations about creating, managing, and using metafields to store and retrieve custom data for apps and themes.
I tried this query to retrieve PAGE MetafieldDefinitions, which gave an internal exception:
query { metafieldDefinitions(first: 250, ownerType: PAGE) { edges { node { id, name } } } }
Here are the full results:
"message - Internal error. Looks like something went wrong on our end.
Request ID: d0443be7-8a1e-4a8a-bc1a-5f95ed94960e (include this in support requests)., extensions - code - INTERNAL_SERVER_ERROR, requestId - d0443be7-8a1e-4a8a-bc1a-5f95ed94960e"
I tried retrieving Metafield Definitions for other ownerTypes (such as PRODUCT) and it works just fine.
I also tried querying for an individual PAGE Metafield Definition by Id and "null" is returned (other non-PAGE metafield definitions return the values as expected)
Solved! Go to the solution
This is an accepted solution.
Hey @BenHarkins
You'll need the content
access scope to access page metafield definitions.
That said, the API shouldn't throw a 500 - the team will investigate. Thanks for flagging.
Scott | Developer Advocate @ Shopify
Hey @BenHarkins
I'm able to replicate - checking with the metafield folks and will report back.
Scott | Developer Advocate @ Shopify
This is an accepted solution.
Hey @BenHarkins
You'll need the content
access scope to access page metafield definitions.
That said, the API shouldn't throw a 500 - the team will investigate. Thanks for flagging.
Scott | Developer Advocate @ Shopify
That worked!
May I suggest updated the label in the Admin API Access Scopes UI to something like:
"View or manage articles, blogs, comments, pages, redirects, and metafield definitions"?
Great suggestion! Shipping now. Thanks
Scott | Developer Advocate @ Shopify