Metafield
Metafields represent custom metadata attached to a resource. Metafields can be sorted into namespaces and are comprised of keys, values, and value types.
Anchor to Fields and connectionsFields and connections
- Anchor to createdAtcreated•Date
At Time! non-null The date and time when the storefront metafield was created.
- Anchor to descriptiondescription•String
The description of a metafield.
- •ID!non-null
A globally-unique ID.
- •String!non-null
The unique identifier for the metafield within its namespace.
- Anchor to namespacenamespace•String!non-null
The container for a group of metafields that the metafield is associated with.
- Anchor to parentResourceparent•Metafield
Resource Parent Resource! non-null The type of resource that the metafield is attached to.
- Anchor to referencereference•Metafield
Reference Returns a reference object if the metafield's type is a resource reference.
- Anchor to referencesreferences•Metafield
Reference Connection A list of reference objects if the metafield's type is a resource reference list.
- Anchor to typetype•String!non-null
The type name of the metafield. Refer to the list of supported types.
- Anchor to updatedAtupdated•Date
At Time! non-null The date and time when the metafield was last updated.
- Anchor to valuevalue•String!non-null
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
Anchor to MutationsMutations
- •mutation
Sets cart metafield values. Cart metafield values will be set regardless if they were previously created or not.
Allows a maximum of 25 cart metafields to be set at a time.
- Anchor to metafieldsmetafields•[Cart
Metafields Set Input!]! required The list of Cart metafield values to set. Maximum of 25.
The input must not contain more than
250
values.
Arguments
- Anchor to metafieldsmetafields•[Metafield!]
The list of cart metafields that were set.
- Anchor to userErrorsuser•[Metafields
Errors Set User Error!]! non-null The list of errors that occurred from executing the mutation.
Fields