Skip to main content
Anchor to MetaobjectDefinition

MetaobjectDefinition

object

Requires read_metaobject_definitions access scope.

Defines the structure and configuration for a custom data type in Shopify. Each definition specifies the fields, validation rules, and capabilities that apply to all Metaobject entries created from it.

The definition includes field definitions that determine what data to store, access controls for the Shopify admin and Storefront APIs, and capabilities such as publishability and translatability. You can track which App or StaffMember created the definition and optionally base it on a StandardMetaobjectDefinitionTemplate.

MetaobjectAccess!
non-null

Access configuration for the metaobject definition.

MetaobjectCapabilities!
non-null

The capabilities of the metaobject definition.

DateTime!
non-null

The date and time when the metaobject definition was created.

App!
non-null

The app used to create the metaobject definition.

StaffMember

The staff member who created the metaobject definition.

String

The administrative description.

String

The key of a field to reference as the display name for each object.

[MetaobjectFieldDefinition!]!
non-null

The fields defined for this object type.

Boolean!
non-null

Whether this metaobject definition has field whose type can visually represent a metaobject with the thumbnailField.

ID!
non-null

A globally-unique ID.

MetaobjectConnection!
non-null

A paginated connection to the metaobjects associated with the definition.

Arguments

Int

The first n elements from the paginated list.

String

The elements that come after the specified cursor.

Int

The last n elements from the paginated list.

String

The elements that come before the specified cursor.

Boolean
Default:false

Reverse the order of the underlying list.


Int!
non-null

The count of metaobjects created for the definition.

String!
non-null

The human-readable name.

StandardMetaobjectDefinitionTemplate

The standard metaobject template associated with the definition.

String!
non-null

The type of the object definition. Defines the namespace of associated metafields.

DateTime!
non-null

The date and time when the metaobject definition was last updated.


Was this section helpful?

query

Retrieves a MetaobjectDefinition by its global ID. Metaobject definitions provide the structure and fields for metaobjects.

The definition includes field configurations, access settings, display preferences, and capabilities that determine how metaobjects of this type behave across the Shopify platform.

Arguments

ID!
required

The ID of the metaobject to return.


query

Retrieves a MetaobjectDefinition by its type. The type serves as a unique identifier that distinguishes one metaobject definition from another.

Arguments

String!
required

The type of the metaobject definition to return.


query

Returns a paginated list of all MetaobjectDefinition objects configured for the store. Metaobject definitions provide the schema for creating custom data structures composed of individual fields. Each definition specifies the field types, access permissions, and capabilities for Metaobject entries of that type. Use this query to discover available metaobject types before creating or querying metaobject entries.

Learn more about managing metaobjects.

Arguments

Int

The first n elements from the paginated list.

String

The elements that come after the specified cursor.

Int

The last n elements from the paginated list.

String

The elements that come before the specified cursor.

Boolean
Default:false

Reverse the order of the underlying list.



Was this section helpful?

mutation

Creates a metaobject definition that establishes the structure for custom data objects in your store. The definition specifies the fields, data types, and access permissions that all Metaobject entries of this type share.

Use the type field to create a unique namespace for your metaobjects. Prefix the type with $app: to reserve the definition for your app's exclusive use. The definition can include capabilities like publishable status or translation eligibility, to extend how metaobjects integrate with Shopify's features.

Learn more about managing metaobjects.

Arguments

MetaobjectDefinitionCreateInput!
required

The input fields for creating a metaobject definition.


mutation

Updates a MetaobjectDefinition's configuration and field structure. You can modify the definition's name, description, display name key, access controls, and capabilities, as well as those of all its fields.

The mutation supports reordering fields when resetFieldOrder is true, which arranges submitted fields first followed by alphabetized omitted fields.

Learn more about managing metaobjects.

Arguments

ID!
required

The ID of the metaobject definition to update.

MetaobjectDefinitionUpdateInput!
required

The input fields for updating a metaobject definition.


mutation

Enables the specified standard metaobject definition from its template.

Arguments

String!
required

The type of the metaobject definition to enable.



Was this section helpful?

interface

Was this section helpful?