stack

Home > @infiniteobjects/shopify-data-manager > AdminTypes > MetafieldStorefrontVisibility

AdminTypes.MetafieldStorefrontVisibility interface

By default, the Storefront API can’t read metafields. To make specific metafields visible in the Storefront API, you need to create a MetafieldStorefrontVisibility record. A MetafieldStorefrontVisibility record is a list of the metafields, defined by the owner_type, namespace, and key, to make visible in the Storefront API.

Learn about [exposing metafields in the Storefront API] (https://shopify.dev/custom-storefronts/products-collections/metafields) for more details.

Signature:

export interface MetafieldStorefrontVisibility extends LegacyInteroperability, Node 

Extends: LegacyInteroperability, Node

Properties

Property Modifiers Type Description
createdAt   Scalars[‘DateTime’][‘output’] The date and time when the metafield was set to visible in the Storefront API.
id   Scalars[‘ID’][‘output’] A globally-unique ID.
key   Scalars[‘String’][‘output’] The key of a metafield to make visible in the Storefront API.
legacyResourceId   Scalars[‘UnsignedInt64’][‘output’] The ID of the corresponding resource in the REST Admin API.
namespace   Scalars[‘String’][‘output’] The namespace of a metafield to make visible in the Storefront API.
ownerType   MetafieldOwnerType | `${MetafieldOwnerType}` The owner type of a metafield to make visible in the Storefront API.
updatedAt   Scalars[‘DateTime’][‘output’] The date and time when the MetafieldStorefrontVisilibty record was updated.