Skip to main content
object

Defines errors encountered while managing metaobject resources.

•MetaobjectUserErrorCode

The error code.

•Int

The index of the failing list element in an array.

•String

The key of the failing object element.

•[String!]

The path to the input field that caused the error.

•String!
non-null

The error message.


Was this section helpful?

•mutation

Asynchronously delete metaobjects and their associated metafields in bulk.

•mutation

Creates a metaobject entry based on an existing MetaobjectDefinition. The type must match a definition that already exists in the shop.

Specify field values using key-value pairs that correspond to the field definitions. The mutation generates a unique handle automatically if you don't provide one. You can also configure capabilities like publishable status to control the metaobject's visibility across channels.

Learn more about managing metaobjects.

•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.

•mutation

Deletes the specified metaobject definition. Also deletes all related metafield definitions, metaobjects, and metafields asynchronously.

•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.

•mutation

Deletes the specified metaobject and its associated metafields.

•mutation

Updates a Metaobject with new field values, handle, or capabilities. Metaobjects are custom data structures that extend Shopify's data model.

You can modify field values mapped to the metaobject's MetaobjectDefinition, update the handle for a unique identifier, and adjust capabilities like publishing status. When updating the handle, you can optionally create a redirect from the old handle to maintain existing references.

•mutation

Creates or updates a Metaobject based on its handle. If a metaobject with the specified handle exists, the mutation updates it with the provided field values. If no matching metaobject exists, the mutation creates a new one.

The handle serves as a unique identifier within a metaobject type. Field values map to the MetaobjectDefinition's field keys and overwrite existing values during updates.

•mutation

Enables the specified standard metaobject definition from its template.


Was this section helpful?


Was this section helpful?