Hi. I’m using the Graphql API to upload products and need some assistance with the process of setting the category metafields (seen in the attached image).
To upload products, I’m using the productSet mutation, which works for populating all of the data that I’m working with right now so far, so I’d like to continue using that mutation only if it’s possible. I was reading online about needing to possibly create metaobjects before populating the metafields, but these ones should already be created by Shopify, right? Anyways, I’d really appreciate a quick workflow and example mutation of how to set the color to black (preferably within the productSet mutation).
Hey @Adam_Heaney - you’re correct that these category metafields are available for merchants to easily associate with their products through the admin (more info here), but they still do technically have to “add” the category metafields if that makes sense.
We do have a standard list of these definitions that you can use to initially “create” the metaobject on a shop though: Standard metaobject definitions.
Once you have the taxonomy definitions you want to use, you’d just follow this guide here to add the metafields to the product: Metafield-linked product options
Hopefully this helps/makes sense, let me know if I can clarify anything on my end here or help out further.