metafieldsSet with partially invalid ownerIds

Hi,

I’m using the metafieldsSet mutation to assign multiple metafield values across various owners — specifically to a few products and a checkout validation function.

Recently, some of the product identifiers in my request became invalid. When I submit the mutation, I receive userErrors for those invalid entries with the message “Owner does not exist.”

The issue I’m running into is that none of the metafields in the batch are being set — not even the ones for valid owners. This behavior seems new and unexpected. Previously, even if a few items in the batch failed, the valid entries would still be processed successfully. This allowed us to temporarily ignore bad records without blocking updates for the rest.

Has something changed in the behavior of metafieldsSet recently? Or has it always been an “all-or-nothing” operation and I’ve simply overlooked that?

Thanks in advance for any clarification!

1 Like

Hey @eugals,

Thanks for reaching out about this. What you are seeing would be expected. Near the top of the doc you linked, it mentions:

This operation is atomic, meaning no changes are persisted if an error is encountered.