Non product and collection metafields? #32091
Replies: 6 comments 1 reply
-
Do you know if these global metafields are available through the admin API? We currently pull down metafields for products, product variants, and collections. Within Gatsby these each have their own types, but they also implement a common interface which is what allows them to be retrieved by |
Beta Was this translation helpful? Give feedback.
-
@sslotsky Ah okay, thanks, that makes sense. I'm assuming that the metafields I'm referring to are available through the Admin API as From the docs, the complete list of Types that return metafields are Collection.metafield |
Beta Was this translation helpful? Give feedback.
-
I'll have to double check this but my recollection is that we couldn't get the |
Beta Was this translation helpful? Give feedback.
-
You're welcome. And the Admin API can still be pinged separately in |
Beta Was this translation helpful? Give feedback.
-
It certainly can. We are just cautious about having more than one way to source the data without at least understanding your use cases first. The logic to consume the regular admin API vs the bulk API is quite different. |
Beta Was this translation helpful? Give feedback.
-
Thanks, I think my use-case is way too specific to make that worthwhile. In most cases with a headless shop, shop-owner-configurable site-wide settings can be handled via a CMS. |
Beta Was this translation helpful? Give feedback.
-
Is there already, or will there at some point be access to all types of metafields? For example, I use an app called Custom Fields by Bonify and they offer a global metafield section. I like it because it allows for arrays of product or metafield references (JSON stringified array of handles) which are really simple for the client.
Searching through
allShopifyMetafieldInterface
, I don't see the global metafields I've created, so am just wondering if they are limited to products and collections for now.As a use-case, I think globals would be really nice for certain types of site configuration with headless shops.
Cheers!
Beta Was this translation helpful? Give feedback.
All reactions