Metafield
A namespaced custom field stored on a resource. Metafields allow you to attach custom data to various entities within the API while maintaining organizational structure through namespaces and keys.
Type Definition
type Metafield {
id: ID!
namespace: String!
key: String!
type: String!
value: String!
jsonValue: JSON
}Fields
Relationships
Metafield is a flexible custom data container that can be attached to multiple resource types throughout the API. It is used by Address, Article, Blog, CartDiscount, CartLineItem, CartPaymentMethod, CartShippingMethod, Cart, Customer, Order, ProductGroup, Product, and ProductVariant objects. This allows any of these entities to store additional custom metadata while maintaining a consistent structure through the namespace and key organization system.
Example
{
metafield {
id
namespace
key
type
value
jsonValue
}
}Implements
None
Related Types
- ID
- String
- JSON