Skip to content

getProductMetafields

getProductMetafields(productId, identifiers, locale?, opts?): Promise<Record<string, { key: string; namespace: string; reference: { __typename: "Product"; handle: string; title: string; } | { __typename: "ProductVariant"; } | { __typename: "MediaImage"; alt: string | null; image: { altText: string | null; height: number | null; url: string; width: number | null; } | null; } | { __typename: "Video"; alt: string | null; previewImage: { altText: string | null; url: string; } | null; sources: object[]; } | { __typename: "Model3d"; } | { __typename: "Collection"; } | { __typename: "Metaobject"; } | { __typename: "GenericFile"; alt: string | null; mimeType: string | null; url: string | null; } | { __typename: "Article"; } | { __typename: "Page"; } | null; references: { nodes: ({ __typename: "Product"; } | { __typename: "ProductVariant"; } | { __typename: "MediaImage"; alt: string | null; image: { altText: … | …; height: … | …; url: string; width: … | …; } | null; } | { __typename: "Video"; alt: string | null; previewImage: { altText: … | …; url: string; } | null; sources: object[]; } | { __typename: "Model3d"; } | { __typename: "Collection"; } | { __typename: "Metaobject"; endsAt: { value: … | …; } | null; handle: string; id: string; memberProducts: { references: … | …; } | null; members: { value: … | …; } | null; parent: { reference: … | … | … | … | … | … | … | … | … | … | …; } | null; pricing: { value: … | …; } | null; startsAt: { value: … | …; } | null; title: { value: … | …; } | null; } | { __typename: "GenericFile"; alt: string | null; mimeType: string | null; url: string | null; } | { __typename: "Article"; } | { __typename: "Page"; })[]; } | null; type: string; value: string; }>>

Defined in: @storesynk/astro/dist/runtime.d.ts:67

Product metafields keyed “namespace.key”, batched exactly like the client’s _fetchMetafields (module-cached per product+identifier set).

string

object[]

I18nState | null

FetchOptions

Promise<Record<string, { key: string; namespace: string; reference: { __typename: "Product"; handle: string; title: string; } | { __typename: "ProductVariant"; } | { __typename: "MediaImage"; alt: string | null; image: { altText: string | null; height: number | null; url: string; width: number | null; } | null; } | { __typename: "Video"; alt: string | null; previewImage: { altText: string | null; url: string; } | null; sources: object[]; } | { __typename: "Model3d"; } | { __typename: "Collection"; } | { __typename: "Metaobject"; } | { __typename: "GenericFile"; alt: string | null; mimeType: string | null; url: string | null; } | { __typename: "Article"; } | { __typename: "Page"; } | null; references: { nodes: ({ __typename: "Product"; } | { __typename: "ProductVariant"; } | { __typename: "MediaImage"; alt: string | null; image: { altText: … | …; height: … | …; url: string; width: … | …; } | null; } | { __typename: "Video"; alt: string | null; previewImage: { altText: … | …; url: string; } | null; sources: object[]; } | { __typename: "Model3d"; } | { __typename: "Collection"; } | { __typename: "Metaobject"; endsAt: { value: … | …; } | null; handle: string; id: string; memberProducts: { references: … | …; } | null; members: { value: … | …; } | null; parent: { reference: … | … | … | … | … | … | … | … | … | … | …; } | null; pricing: { value: … | …; } | null; startsAt: { value: … | …; } | null; title: { value: … | …; } | null; } | { __typename: "GenericFile"; alt: string | null; mimeType: string | null; url: string | null; } | { __typename: "Article"; } | { __typename: "Page"; })[]; } | null; type: string; value: string; }>>