Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
I'm looking to access a Customer's Metafields through the Storefront API. It seems that a Customer Connection for `metafields (MetafieldConnection!)` is NOT present like it is on, say, the Product resource.
The strange thing is that we can expose these Metafields using the Admin GraphQl's metafieldStorefrontVisibilityCreate mutation. Please note the option for `CUSTOMER` in ownerTypes. I can't see any other value in including this unless it was available in the Storefront API.
Hopefully someone from Shopify can provide some insight here.
Hi @cbodtorf ,
Currently with the Storefront API, support for Metafields is limited to just the Product and ProductVariant resources and it is restricted to only querying.
Some docs for more information about Storefront API and metafields: https://shopify.dev/changelog/storefront-api-updates-metafields-scripts-and-more and https://shopify.dev/tutorials/retrieve-metafields-with-storefront-api
Hassain | Developer Support Specialist @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution
Any thoughts on what the purpose of exposing the metafields on the 'CUSTOMER' ownerType would be?
User | RANK |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |