Hello,
I have question i have noticed that shopify admin graphql does not allow us to add shopify product metafield if we want to add metafields we need to make our custom we can not use theirs.
For example:
- I am adding one product with admin graphql api and i have product material and color that i need in shopify product that i am creating
- but shopify would not allow me to add those fields (same they are using) i need to make my own.
- But if i create that product without these field and go to admin panel > products > example product
- There i can assign these values
So i can’t use shopify’s default category metafields right?
It would create issues if let’s say i have decided to use ebay-app for selling the same product to ebay but on my ebay seller account these metafields won’t show cause that ebay app that i using to synchronize products between shopify and ebay it might not take my custom metafield as part of product data and it won’t show on ebay listings
Am i missing something here and there is a way?
I mean these properties like material, color are basic and should be there and it should be system defined not by us.
Thanks in advance for your reply!
Quick drive by answer it’s a bit of a tangle, try the metaobjects to customize category metafields(mfs check for a metaobject_reference as the mf type.
I think the core issue is that there is shopify prodcut category properties are just that properties, and also category metafields) of if they are under the hood are reserved so apps cannot arbitrarily modify them; e.g. they are owned by the merchant so that’s why you can edit them but not mutate them in the api
Also see
https://shopify.dev/docs/api/admin-graphql/latest/objects/Product#field-Product.fields.category
so category is updated with productUpdate not metafields
https://shopify.dev/docs/api/admin-graphql/latest/objects/TaxonomyCategory
https://shopify.dev/docs/apps/build/metafields/list-of-standard-definitions#interacting-with-standard-metafield-definitions
Use the assistant to get references to queries and mutations you validate.
e.g. how to update shopify’s default product category metafield on a product for material and color metafields or metaobjects.
note though the assistant looooves to tell you to make an app and used app reserved mf prefixes.
For api features requests contact an actual shopify support advisorhttps://help.shopify.com/
, and or use the actual dev forums, SEARCH FIRST before posting https://community.shopify.dev/
You need to improve your description before involving others, we aren’t mind readers don’t treat such things as if others can just magically see your screen or peer into the past.
Communicate DETAIL to replicate a problem that others shouldn’t even have to ask. http://www.catb.org/~esr/faqs/smart-questions.html, https://stackoverflow.com/help/how-to-ask etc
SHOW the work, what tools are being used, what queries are being used etc. format posts using code blocks.
What does that mean, when dealing with technical be SPECIFIC, error messages, urls.