--- title: MetafieldParentResource - Storefront API description: > The Shopify resource that owns a metafield. Returned by the `Metafield` object's [`parentResource`](/docs/api/storefront/2026-01/objects/Metafield#field-Metafield.fields.parentResource) field, enabling traversal from a metafield back to the resource it's attached to. api_version: 2026-01 api_name: storefront type: union api_type: graphql source_url: html: >- https://shopify.dev/docs/api/storefront/2026-01/unions/MetafieldParentResource md: >- https://shopify.dev/docs/api/storefront/2026-01/unions/MetafieldParentResource.md --- # Metafield​Parent​Resource union The Shopify resource that owns a metafield. Returned by the `Metafield` object's [`parentResource`](https://shopify.dev/docs/api/storefront/2026-01/objects/Metafield#field-Metafield.fields.parentResource) field, enabling traversal from a metafield back to the resource it's attached to. ## Fields with this union * [Metafield.parentResource](https://shopify.dev/docs/api/storefront/2026-01/objects/Metafield#field-Metafield.fields.parentResource) OBJECT [Custom metadata](https://shopify.dev/docs/apps/build/metafields) attached to a Shopify resource such as a [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product), [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection), or [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer). Each metafield is identified by a namespace and key, and stores a value with an associated type. Values are always stored as strings, but the [`type`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.type) field indicates how to interpret the data. When a metafield's type is a resource reference, use the [`reference`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.reference) or [`references`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.references) fields to retrieve the linked objects. Access metafields on any resource that implements the [`HasMetafields`](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields) interface. *** ```graphql union MetafieldParentResource = Article | Blog | Cart | Collection | Company | CompanyLocation | Customer | Location | Market | Order | Page | Product | ProductVariant | SellingPlan | Shop ```