Metafields Set User Error
An error that occurs during the execution of .
Anchor to FieldsFields
- Anchor to codecode•Metafields
Set User Error Code The error code.
- Anchor to elementIndexelement•Int
Index The index of the array element that's causing the error.
- Anchor to fieldfield•[String!]
The path to the input field that caused the error.
- Anchor to messagemessage•String!non-null
The error message.
Anchor to MutationsMutations
- •mutation
Sets metafield values. Metafield values will be set regardless if they were previously created or not.
Allows a maximum of 25 metafields to be set at a time, with a maximum total request payload size of 10MB.
This operation is atomic, meaning no changes are persisted if an error is encountered.
As of
2024-07, this operation supports compare-and-set functionality to better handle concurrent requests. Ifis set for any metafield, the mutation will only set that metafield if the persisted metafield value matches the digest used on. If the metafield doesn't exist yet, but you want to guarantee that the operation will run in a safe manner, settonull. Thevalue can be acquired by querying the metafield object and selectingas a field. If thevalue does not match the digest for the persisted value, the mutation will return an error. You can opt out of write guarantees by not sendingin the request.