# Metafield - storefront - OBJECT
Version: 2025-04

## 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/2025-04/scalars/DateTime): DateTime! - The date and time when the storefront metafield was created.
* [description](/docs/api/storefront/2025-04/scalars/String): String - The description of a metafield.
* [id](/docs/api/storefront/2025-04/scalars/ID): ID! - A globally-unique ID.
* [key](/docs/api/storefront/2025-04/scalars/String): String! - The unique identifier for the metafield within its namespace.
* [namespace](/docs/api/storefront/2025-04/scalars/String): String! - The container for a group of metafields that the metafield is associated with.
* [parentResource](/docs/api/storefront/2025-04/unions/MetafieldParentResource): MetafieldParentResource! - The type of resource that the metafield is attached to.
* [reference](/docs/api/storefront/2025-04/unions/MetafieldReference): MetafieldReference - Returns a reference object if the metafield's type is a resource reference.
* [type](/docs/api/storefront/2025-04/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/2025-04/scalars/DateTime): DateTime! - The date and time when the metafield was last updated.
* [value](/docs/api/storefront/2025-04/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/2025-04/connections/MetafieldReferenceConnection): MetafieldReferenceConnection



## Related queries

## Related mutations
* [cartMetafieldsSet](/docs/api/storefront/2025-04/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