Skip to Content

MetafieldInput

Input for a namespaced metafield stored on a resource.

Input Definition

input MetafieldInput { namespace: String! key: String! type: String! value: String! }

Fields

FieldTypeRequiredDescription
namespaceStringYesNamespace grouping this metafield (2-64 letters, numbers, underscore, or hyphen).
keyStringYesKey within the namespace (2-64 letters, numbers, underscore, or hyphen).
typeStringYesStored value type, e.g. single_line_text_field, json, boolean.
valueStringYesValue stored as a string. JSON types should be serialized JSON.

Example

mutation { updateResource(input: { metafield: { namespace: "custom_app" key: "product_info" type: "json" value: "{\"color\": \"blue\", \"size\": \"large\"}" } }) { resource { id } } }

No related types specified.