New Shopify Certification now available: Liquid Storefronts for Theme Developers

Read product private metafield in Cart input

Solved
markus12
Shopify Partner
29 1 13

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
Shopify Staff
94 25 37

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
Shopify Staff
94 25 37

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
5 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