# Metafield - storefront - OBJECT Version: 2024-10 ## Description Metafields represent custom metadata attached to a resource. Metafields can be sorted into namespaces and are comprised of keys, values, and value types. ### Access Scopes ## Fields * [createdAt](/docs/api/storefront/2024-10/scalars/DateTime): DateTime! - The date and time when the storefront metafield was created. * [description](/docs/api/storefront/2024-10/scalars/String): String - The description of a metafield. * [id](/docs/api/storefront/2024-10/scalars/ID): ID! - A globally-unique ID. * [key](/docs/api/storefront/2024-10/scalars/String): String! - The unique identifier for the metafield within its namespace. * [namespace](/docs/api/storefront/2024-10/scalars/String): String! - The container for a group of metafields that the metafield is associated with. * [parentResource](/docs/api/storefront/2024-10/unions/MetafieldParentResource): MetafieldParentResource! - The type of resource that the metafield is attached to. * [reference](/docs/api/storefront/2024-10/unions/MetafieldReference): MetafieldReference - Returns a reference object if the metafield's type is a resource reference. * [type](/docs/api/storefront/2024-10/scalars/String): String! - The type name of the metafield. Refer to the list of [supported types](https://shopify.dev/apps/metafields/definitions/types). * [updatedAt](/docs/api/storefront/2024-10/scalars/DateTime): DateTime! - The date and time when the metafield was last updated. * [value](/docs/api/storefront/2024-10/scalars/String): String! - The data stored in the metafield. Always stored as a string, regardless of the metafield's type. ## Connections * [references](/docs/api/storefront/2024-10/connections/MetafieldReferenceConnection): MetafieldReferenceConnection ## Related queries ## Related mutations * [cartMetafieldsSet](/docs/api/storefront/2024-10/mutations/cartMetafieldsSet) Sets cart metafield values. Cart metafield values will be set regardless if they were previously created or not. Allows a maximum of 25 cart metafields to be set at a time. ## Related Unions ## Examples