--- title: MetafieldDefinitionCreateUserError - GraphQL Admin description: An error that occurs during the execution of `MetafieldDefinitionCreate`. api_version: 2025-10 api_name: admin type: object api_type: graphql source_url: html: https://shopify.dev/docs/api/admin-graphql/latest/objects/metafielddefinitioncreateusererror md: https://shopify.dev/docs/api/admin-graphql/latest/objects/metafielddefinitioncreateusererror.md --- # Metafield​Definition​Create​User​Error object An error that occurs during the execution of `MetafieldDefinitionCreate`. ## Fields * code [Metafield​Definition​Create​User​Error​Code](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldDefinitionCreateUserErrorCode) The error code. * element​Index [Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int) The index of the array element that's causing the error. * field [\[String!\]](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String) The path to the input field that caused the error. * message [String!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String) non-null The error message. *** ## Map No referencing types *** ## Mutations * [metafield​Definition​Create](https://shopify.dev/docs/api/admin-graphql/latest/mutations/metafieldDefinitionCreate) mutation 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. *** ## <\~> MetafieldDefinitionCreateUserError Mutations ### Mutated by * <\~>[metafield​Definition​Create](https://shopify.dev/docs/api/admin-graphql/latest/mutations/metafieldDefinitionCreate) *** ## Interfaces * [Displayable​Error](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/DisplayableError) interface *** ## ||-MetafieldDefinitionCreateUserError Implements ### Implements * ||-[Displayable​Error](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/DisplayableError)