Skip to content

parseBundleMetaobject

parseBundleMetaobject(node): { entry: BundleEntry; products: object[]; } | null

Defined in: .pnpm/@[email protected]_graphql@[email protected]_typescript@6.0.3/node_modules/@storesynk/core/dist/product/bundles.d.ts:117

Parse one $app:bundle metaobject node into a BundleEntry plus its resolved member products. Tolerant by design (a metaobject can be stale or hand-authored under a merchant’s own type): a missing/blank title, a pricing json whose type this build doesn’t know, or a members json with an unknown v all skip the WHOLE bundle rather than half-rendering it; unknown extra json keys pass through. Returns null when the node doesn’t parse.

"Metaobject"

{ value: string | null; } | null

string

string

{ references: { nodes: ({ __typename: "Product"; featuredImage: { altText: … | …; url: string; } | null; handle: string; id: string; options: object[]; priceRange: { minVariantPrice: { amount: string; currencyCode: … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | … | …; }; }; title: string; variants: { nodes: object[]; pageInfo: { hasNextPage: boolean; }; }; } | { __typename: "ProductVariant"; } | { __typename: "MediaImage"; } | { __typename: "Video"; } | { __typename: "Model3d"; } | { __typename: "Collection"; } | { __typename: "Metaobject"; } | { __typename: "GenericFile"; } | { __typename: "Article"; } | { __typename: "Page"; })[]; } | null; } | null

{ value: string | null; } | null

{ reference: { __typename: "Product"; handle: string; id: string; } | { __typename: "ProductVariant"; } | { __typename: "MediaImage"; } | { __typename: "Video"; } | { __typename: "Model3d"; } | { __typename: "Collection"; } | { __typename: "Metaobject"; } | { __typename: "GenericFile"; } | { __typename: "Article"; } | { __typename: "Page"; } | null; } | null

{ value: string | null; } | null

{ value: string | null; } | null

{ value: string | null; } | null

{ entry: BundleEntry; products: object[]; } | null