Shopify uses cookies to provide necessary site functionality and improve your experience. By using our website, you agree to our privacy policy and our cookie policy.
Metafield definitions enable you to define additional validation constraints for metafields, and enable the
merchant to edit metafield values in context.
access•
MetafieldAccess!
non-null
The access settings associated with the metafield definition.
capabilities•
MetafieldCapabilities!
non-null
The capabilities of the metafield definition.
constraints•
MetafieldDefinitionConstraints
The constraints
that determine what subtypes of resources a metafield definition applies to.
createdAt•
DateTime!
non-null
The date and time when the metafield definition was created.
description•
String
The description of the metafield definition.
id•
ID!
non-null
A globally-unique ID.
key•
String!
non-null
The unique identifier for the metafield definition within its namespace.
metafields•
MetafieldConnection!
non-null
The metafields that belong to the metafield definition.
metafieldsCount•
Int!
non-null
The count of the metafields that belong to the metafield definition.
name•
String!
non-null
The human-readable name of the metafield definition.
namespace•
String!
non-null
The container for a group of metafields that the metafield definition is associated with.
ownerType•
MetafieldOwnerType!
non-null
The resource type that the metafield definition is attached to.
pinnedPosition•
Int
The position of the metafield definition in the pinned list.
standardTemplate•
StandardMetafieldDefinitionTemplate
The standard metafield definition template associated with the metafield definition.
type•
MetafieldDefinitionType!
non-null
The type of data that each of the metafields that belong to the metafield definition will store.
Refer to the list of supported types.
updatedAt•
DateTime!
non-null
The date and time when the metafield definition was updated.
useAsCollectionCondition•
Boolean!
non-null
Whether the metafield definition can be used as a collection condition.
validations•
[MetafieldDefinitionValidation!]!
non-null
A list of validation options for
the metafields that belong to the metafield definition. For example, for a metafield definition with the
type date, you can set a minimum date validation so that each of the metafields that belong to it can only
store dates after the specified minimum.
validationStatus•
MetafieldDefinitionValidationStatus!
non-null
The validation status for the metafields that belong to the metafield definition.