App Owned metafield query failed with Internal Error

I’ve created App owned metafield and able to access the Json value in liquid on my app extension.

When I queried the GraphQL API using - privateMetafields(owner:“gid://shopify/AppInstallation/397455098112”,first:2), I keep getting error

‘Internal error. Looks like something went wrong on our end.’
The request ID :

  • 3c81410b-c730-4ad7-ab6e-64acb1823359 (include this in support requests).
  • “2ba0a89b-dab4-4885-a560-269bceec6951”
    Did I do anything wrong ? I uses privateMetafields query as there are no AppOwned query and the doc mentioned private metafield works the same except for the liquid part. Please advise. Thks
    btw I using the latest 2022-10 API.

Hi, @leonpl . I’m Eliseu from the Metafields team.

You should be using the metafields query rather than privateMetafields for this one. App-owned metafields work similar to private metafields, but they are not part of private metafields per se.

Hi Edaroit,

Thks for the prompt reply.

was a little confused with the doc https://shopify.dev/api/admin-graphql/2022-10/queries/metafields as it says not supported. It’'s working now with appinstallation.

Thks :wink: