# MetafieldInput Input for a namespaced metafield stored on a resource. ## Input Definition ```graphql input MetafieldInput { namespace: String! key: String! type: String! value: String! } ``` ## Fields | Field | Type | Required | Description | |-------|------|----------|-------------| | namespace | String | Yes | Namespace grouping this metafield (2-64 letters, numbers, underscore, or hyphen). | | key | String | Yes | Key within the namespace (2-64 letters, numbers, underscore, or hyphen). | | type | String | Yes | Stored value type, e.g. single_line_text_field, json, boolean. | | value | String | Yes | Value stored as a string. JSON types should be serialized JSON. | ## Example ```graphql mutation { updateResource(input: { metafield: { namespace: "custom_app" key: "product_info" type: "json" value: "{\"color\": \"blue\", \"size\": \"large\"}" } }) { resource { id } } } ``` ## Related Types No related types specified.