--- title: MetafieldDefinitionIdentifier - GraphQL Admin description: 'Identifies a metafield definition by its owner type, namespace, and key.' api_version: unstable api_name: admin source_url: html: >- https://shopify.dev/docs/api/admin-graphql/unstable/objects/MetafieldDefinitionIdentifier md: >- https://shopify.dev/docs/api/admin-graphql/unstable/objects/MetafieldDefinitionIdentifier.md --- # Metafield​Definition​Identifier object Identifies a metafield definition by its owner type, namespace, and key. ## Fields * key [String!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) non-null The unique identifier for the metafield definition within its namespace. * namespace [String!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/String) non-null The container for a group of metafields that the metafield definition is associated with. * owner​Type [Metafield​Owner​Type!](https://shopify.dev/docs/api/admin-graphql/unstable/enums/MetafieldOwnerType) non-null The resource type that the metafield definition is attached to. *** ## Map No referencing types *** ## Mutations * [metafield​Definition​Delete](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/metafieldDefinitionDelete) mutation Deletes a [`MetafieldDefinition`](https://shopify.dev/docs/api/admin-graphql/current/objects/MetafieldDefinition). You can identify the definition by providing either its owner type, namespace, and key, or its global ID. When you set [`deleteAllAssociatedMetafields`](https://shopify.dev/docs/api/admin-graphql/current/mutations/metafieldDefinitionDelete#arguments-deleteAllAssociatedMetafields) to `true`, the mutation asynchronously deletes all [`Metafield`](https://shopify.dev/docs/api/admin-graphql/current/objects/Metafield) objects that use this definition. This option must be `true` when deleting definitions under the `$app` namespace. Learn more about [deleting metafield definitions](https://shopify.dev/docs/apps/build/custom-data/metafields/definitions). * id [ID](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID) ### Arguments The id of the metafield definition to delete. Using `identifier` is preferred. * identifier [Metafield​Definition​Identifier​Input](https://shopify.dev/docs/api/admin-graphql/unstable/input-objects/MetafieldDefinitionIdentifierInput) The identifier of the metafield definition to delete. * delete​All​Associated​Metafields [Boolean](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/Boolean) Default:false Whether to delete all associated metafields. *** *** ## <\~> MetafieldDefinitionIdentifier Mutations ### Mutated by * <\~>[metafield​Definition​Delete](https://shopify.dev/docs/api/admin-graphql/unstable/mutations/metafieldDefinitionDelete)