Skip to main content
Log inSign up

Shopify uses cookies to provide necessary site functionality and improve your experience. By using our website, you agree to our privacy policy and our cookie policy.

Anchor to metafieldStorefrontVisibility

metafieldStorefrontVisibility

queryDeprecated

Returns a MetafieldStorefrontVisibility record by ID. A MetafieldStorefrontVisibility record lists the metafields to make visible in the Storefront API. This query will be removed in a future version. Use the access.storefront field inside the metafieldDefinition query instead.

ID!required

The ID of the MetafieldStorefrontVisibility to return.


Was this section helpful?

Anchor to MetafieldStorefrontVisibilityMetafieldStorefrontVisibility

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.

createdAt
non-null

The date and time when the metafield was set to visible in the Storefront API.

id
non-null

A globally-unique ID.

key
non-null

The key of a metafield to make visible in the Storefront API.

legacyResourceId
non-null

The ID of the corresponding resource in the REST Admin API.

namespace
non-null

The namespace of a metafield to make visible in the Storefront API.

ownerType
non-null

The owner type of a metafield to make visible in the Storefront API.

updatedAt
non-null

The date and time when the MetafieldStorefrontVisilibty record was updated.


Was this section helpful?