Solved

How do I update metafield on product via GraphQL API?

Louise_Elmose_H
Shopify Partner
78 2 21

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

Accepted Solution (1)

Louise_Elmose_H
Shopify Partner
78 2 21

This is an accepted solution.

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

View solution in original post

Reply 1 (1)

Louise_Elmose_H
Shopify Partner
78 2 21

This is an accepted solution.

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