Query reserved prefixes metafields

Solved

Query reserved prefixes metafields

antonioreale
Shopify Partner
19 1 3

Hello, if I create private metafields with reserved prefixes can I request them with the query privateMetafields ?

I only want to get metafields, I don't want to get the resource.

Accepted Solution (1)

KathB
Shopify Staff
7 2 5

This is an accepted solution.

Hi there, private metafields as documented here are a different kind of entity from regular metafields that use a reserved prefix (and are therefore private to the owning app). If you are using the latter, then you can't query them with privateMetafields, they are regular metafields and you can query them by id with the metafield query.

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Reply 1 (1)

KathB
Shopify Staff
7 2 5

This is an accepted solution.

Hi there, private metafields as documented here are a different kind of entity from regular metafields that use a reserved prefix (and are therefore private to the owning app). If you are using the latter, then you can't query them with privateMetafields, they are regular metafields and you can query them by id with the metafield query.

To learn more visit the Shopify Help Center or the Community Blog.