How do I update metafield on product via GraphQL API?

Solved
Louise_Elmose_H
Shopify Partner
63 2 7

Hi,

How are you supposed to update a metafield on a product via the GraphQL API?
There's only a mutation for deleting a metafield, not for creating.
If I delete the metafield and do a product update afterwards with the metafield, the metafield is not created.


Thanks,

-Louise

0 Likes
Louise_Elmose_H
Shopify Partner
63 2 7

This is an accepted solution.

Never mind, rookie mistake, forgot to check userErrors on the productUpdate mutation - DO'H!

0 Likes