Skip to content

parseVolumeDiscountMetaobject

parseVolumeDiscountMetaobject(node): VolumeDiscountEntry | null

Defined in: .pnpm/@[email protected]_graphql@[email protected]_typescript@6.0.3/node_modules/@storesynk/core/dist/product/volume-discounts.d.ts:92

Parse one $app:volume_discount metaobject node. Tolerant by design (a metaobject can be stale or hand-authored under a merchant’s own type): a missing/blank title, a tiers json with an unknown v or an unknown pricing.type, a structurally broken tier, or an unknown applies_to.type all skip the WHOLE discount rather than half-rendering it; unknown extra json keys pass through. Returns null when the node doesn’t parse.

"Metaobject"

{ value: string | null; } | null

{ references: { nodes: ({ __typename: "Product"; } | { __typename: "ProductVariant"; } | { __typename: "MediaImage"; } | { __typename: "Video"; } | { __typename: "Model3d"; } | { __typename: "Collection"; id: string; } | { __typename: "Metaobject"; } | { __typename: "GenericFile"; } | { __typename: "Article"; } | { __typename: "Page"; })[]; } | null; } | null

{ value: string | null; } | null

string

string

{ value: string | null; } | null

{ value: string | null; } | null

{ value: string | null; } | null

{ value: string | null; } | null

VolumeDiscountEntry | null