Skip to main content
Anchor to metafieldDefinitionDelete

metafieldDefinitionDelete

mutation

Requires API client to have access to the resource type associated with the metafield definition.

Deletes a MetafieldDefinition. You can identify the definition by providing either its owner type, namespace, and key, or its global ID.

When you set deleteAllAssociatedMetafields to true, the mutation asynchronously deletes all Metafield objects that use this definition. This option must be true when deleting definitions under the $app namespace.

Learn more about deleting metafield definitions.

Anchor to deleteAllAssociatedMetafieldsdeleteAllAssociatedMetafields
Boolean
Default:false

Whether to delete all associated metafields.

ID

The id of the metafield definition to delete. Using identifier is preferred.

MetafieldDefinitionIdentifierInput

The identifier of the metafield definition to delete.


Was this section helpful?

Anchor to MetafieldDefinitionDeletePayload returnsMetafieldDefinitionDeletePayload returns

MetafieldDefinitionIdentifier

The metafield definition that was deleted.

ID

The ID of the deleted metafield definition.

[MetafieldDefinitionDeleteUserError!]!
non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?