Issue when retrieving pages metafields

Issue when retrieving pages metafields

AlexanderWeb
Shopify Partner
16 0 2

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 238 508

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