Home > @infiniteobjects/shopify-data-manager > AdminTypes > Metafield
Metafields enable you to attach additional information to a Shopify resource, such as a [Product](https://shopify.dev/api/admin-graphql/latest/objects/product) or a [Collection](https://shopify.dev/api/admin-graphql/latest/objects/collection). For more information about where you can attach metafields refer to [HasMetafields](https://shopify.dev/api/admin/graphql/reference/common-objects/HasMetafields). Some examples of the data that metafields enable you to store are specifications, size charts, downloadable documents, release dates, images, or part numbers. Metafields are identified by an owner resource, namespace, and key. and store a value along with type information for that value.
Signature:
export interface Metafield extends LegacyInteroperability, Node
Extends: LegacyInteroperability, Node
Property | Modifiers | Type | Description |
---|---|---|---|
createdAt | Scalars[‘DateTime’][‘output’] | The date and time when the metafield was created. | |
definition? | Maybe<MetafieldDefinition> | (Optional) The metafield definition that the metafield belongs to, if any. | |
description? | Maybe<Scalars[‘String’][‘output’]> | (Optional) The description of the metafield. | |
id | Scalars[‘ID’][‘output’] | A globally-unique ID. | |
key | Scalars[‘String’][‘output’] | The unique identifier for the metafield within its namespace. | |
legacyResourceId | Scalars[‘UnsignedInt64’][‘output’] | The ID of the corresponding resource in the REST Admin API. | |
namespace | Scalars[‘String’][‘output’] | The container for a group of metafields that the metafield is associated with. | |
owner | HasMetafields | The resource that the metafield is attached to. | |
ownerType | MetafieldOwnerType | `${MetafieldOwnerType}` | The type of resource that the metafield is attached to. | |
reference? | Maybe<MetafieldReference> | (Optional) Returns a reference object if the metafield definition’s type is a resource reference. | |
references? | Maybe<MetafieldReferenceConnection> | (Optional) A list of reference objects if the metafield’s type is a resource reference list. | |
type | Scalars[‘String’][‘output’] | The type of data that is stored in the metafield. Refer to the list of [supported types](https://shopify.dev/apps/metafields/types). | |
updatedAt | Scalars[‘DateTime’][‘output’] | The date and time when the metafield was updated. | |
value | Scalars[‘String’][‘output’] | The data stored in the metafield. Always stored as a string, regardless of the metafield’s type. |