Skip to main content

Metafield translations now available via GraphQL Admin API

The Metafield type now includes a translations field, enabling you to query localized metafield values directly via the GraphQL Admin API. This enhancement allows you to access translations for metafields associated with any resource, including products, collections, customers, orders, locations, and more.

Querying translations

To query translations for a resource's metafields, including their localized values, see the Get translations for a product metafield example.

Registering a translation

To register a translation, use the translationsRegister mutation with the metafield's resource ID and a content digest. The compareDigest ensures that translations remain synchronized with the original value. You can obtain this digest when creating or querying a metafield.

See the Register a French translation for a metafield value example for the full workflow.

Translation is supported for text-based metafield types, including single_line_text_field, multi_line_text_field, rich_text_field, and html. Ensure that the target locale is enabled and published on your store.

For further information, refer to the Metafield and translationsRegister documentation.

Was this section helpful?