Anchor to section titled 'undefined'

MetafieldDefinition
object

Metafield definitions enable you to define additional validation constraints for metafields, and enable the merchant to edit metafield values in context.


The access settings associated with the metafield definition.

The description of the metafield definition.

A globally-unique ID.

The unique identifier for the metafield definition within its namespace.

The metafields that belong to the metafield definition.

The count of the metafields that belong to the metafield definition.

The human-readable name of the metafield definition.

The container for a group of metafields that the metafield definition is associated with.

The resource type that the metafield definition is attached to.

The position of the metafield definition in the pinned list.

The standard metafield definition template associated with the metafield definition.

The type of data that each of the metafields that belong to the metafield definition will store. Refer to the list of supported types.

Whether the metafield definition can be used as a collection condition.

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.

The validation status for the metafields that belong to the metafield definition.


Was this section helpful?
Map

Fields and connections from

MetafieldDefinition


Returns a metafield definition by identifier.

Returns a list of metafield definitions.


Was this section helpful?
<?>
MetafieldDefinition Queries
MetafieldDefinition


Creates a metafield definition. Any metafields existing under the same owner type, namespace, and key will be checked against this definition and will have their type updated accordingly. For metafields that are not valid, they will remain unchanged but any attempts to update them must align with this definition.

You can organize your metafields in your Shopify admin by pinning/unpinning metafield definitions. The order of your pinned metafield definitions determines the order in which your metafields are displayed on the corresponding pages in your Shopify admin. By default, only pinned metafields are automatically displayed.

You can organize your metafields in your Shopify admin by pinning/unpinning metafield definitions. The order of your pinned metafield definitions determines the order in which your metafields are displayed on the corresponding pages in your Shopify admin. By default, only pinned metafields are automatically displayed.

Updates a metafield definition.

Activates the specified standard metafield definition from its template.

Refer to the list of standard metafield definition templates.


Was this section helpful?



Was this section helpful?
||-
MetafieldDefinition Implements
MetafieldDefinition

Implements