Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Read product private metafield in Cart input

Solved

Read product private metafield in Cart input

markus12
Shopify Partner
30 1 14

Hi,

 

Now it's possible to read public product metafields in cart input

https://shopify.dev/api/functions/reference/product-discounts/graphql/common-objects/product

 

but not private metafields. Would you please add private metafields too?

There's no access limitation, since both the function and private metafields belong to same app.

 

Thanks

Accepted Solution (1)

Nick_Wesselman
Shopify Staff
171 43 73

This is an accepted solution.

Hi @markus12 -- Function input queries now support reserved namespaces, which make private metafields unnecessary.

Nick Wesselman | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

View solution in original post

Replies 2 (2)

Nick_Wesselman
Shopify Staff
171 43 73

This is an accepted solution.

Hi @markus12 -- Function input queries now support reserved namespaces, which make private metafields unnecessary.

Nick Wesselman | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

RickyMagana
Shopify Partner
6 0 0

Hello Nick.

 

How can i get two metafields of a product from input.graphql ?

 

Actually, I can get value of one field but i need to get two or more values of metafields. If it is possible, I need to know how is the structure of input.graphql.

 

I Attach my input.graphql