Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.
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
117 29 45

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
117 29 45

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