Skip to main content
Anchor to MetafieldDefinitionCreateUserError

MetafieldDefinitionCreateUserError

object

An error that occurs during the execution of MetafieldDefinitionCreate.

•MetafieldDefinitionCreateUserErrorCode

The error code.

•Int

The index of the array element that's causing the error.

•[String!]

The path to the input field that caused the error.

•String!
non-null

The error message.


Was this section helpful?

•mutation

Creates a MetafieldDefinition that establishes structure and validation rules for metafields. The definition specifies the data type, validation constraints, and access permissions for metafields with a given namespace and key combination.

When you create a new definition, the system validates any existing unstructured metafields matching the same owner type, namespace, and key against it. The system updates each valid metafield's type to match the definition. Invalid metafields remain unchanged but must conform to the definition when updated.

Learn more about creating metafield definitions.


Was this section helpful?


Was this section helpful?