Skip to main content

parseMetafield

A function that uses metafield.type to parse the Metafield's value or reference or references (depending on the metafield.type) and places the result in metafield.parsedValue.

Use the ParsedMetafields type as the returned type of parseMetafield(metafield)

Anchor to metafield
metafield
{ id?: string; __typename?: "Metafield"; createdAt?: string; description?: string; key?: string; namespace?: string; parentResource?: { metafield?: { id?: string; __typename?: "Metafield"; createdAt?: string; ... 8 more ...; value?: string; }; ... 29 more ...; weightUnit?: WeightUnit; } | ... 13 more ... | { ...; };...
required

ReturnGeneric

Was this page helpful?