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.

Issue when retrieving pages metafields

Issue when retrieving pages metafields

AlexanderWeb
Shopify Partner
20 0 3

I have the following metafield definition associated to each page:

 

Screenshot 2023-07-20 at 15.42.44.png

 

and t has the following config:

Screenshot 2023-07-20 at 15.43.26.png

 

however when I retrieve the metafields from the only 2 pages I get the value of null for each:

 

Screenshot 2023-07-20 at 15.44.19.png

 

the 2nd screenshots shos the association with the meta field but it's returning null and I can also see it here:

 

Screenshot 2023-07-20 at 15.46.15.png

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 239 534

Hi @AlexanderWeb,

 

In the graphql query it looks like you've got both the namespace and key together in the key field as 'custom.menu_list' where instead they should be separated with the namespace being 'custom' and the 'key' being 'menu_list'.

 

In case it's helpful here's the dev docs about managing metafields:

https://shopify.dev/docs/apps/custom-data/metafields/manage-metafields

 

Have a great day,
Jon551

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog