Metafield
The custom metadata attached to a resource. Metafields can be sorted into namespaces and are comprised of keys, values, and value types.
Anchor to FieldsFields
- Anchor to compareDigestcompare•String!
Digest non-null The data stored in the resource, represented as a digest.
- Anchor to createdAtcreated•Date
At Time! non-null The date and time when the metafield was created.
- •ID!non-nullPre-auth accessible
A globally-unique ID.
- Anchor to jsonValuejson•JSON!
Value non-null The data stored in the metafield in JSON format.
- •String!non-nullPre-auth accessible
The key name for a metafield.
- Anchor to namespacenamespace•String!non-nullPre-auth accessible
The namespace for a metafield.
- Anchor to typetype•String!non-nullPre-auth accessible
The type name of the metafield. See the list of supported types.
- Anchor to updatedAtupdated•Date
At Time! non-null The date and time when the metafield was updated.
- Anchor to valuevalue•String!non-nullPre-auth accessible
The value of a metafield.
- Anchor to descriptiondescription•StringDeprecated
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.
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.