--- title: MetafieldReference - Customer API description: Returns the resource which is being referred to by a metafield. api_version: 2026-04 api_name: customer type: union api_type: graphql source_url: html: 'https://shopify.dev/docs/api/customer/latest/unions/MetafieldReference' md: 'https://shopify.dev/docs/api/customer/latest/unions/MetafieldReference.md' --- # Metafield​Reference union Returns the resource which is being referred to by a metafield. ## Fields with this union * [Metafield.reference](https://shopify.dev/docs/api/customer/latest/objects/Metafield#field-Metafield.fields.reference) OBJECT The custom metadata attached to a resource. Metafields can be sorted into namespaces and are comprised of keys, values, and value types. * [Metafield.references](https://shopify.dev/docs/api/customer/latest/objects/Metafield#field-Metafield.fields.references) OBJECT The custom metadata attached to a resource. Metafields can be sorted into namespaces and are comprised of keys, values, and value types. * [Metafield​Reference​Connection.nodes](https://shopify.dev/docs/api/customer/latest/connections/MetafieldReferenceConnection#returns-nodes) CONNECTION An auto-generated type for paginating through multiple MetafieldReferences. * [Metafield​Reference​Edge.node](https://shopify.dev/docs/api/customer/latest/objects/MetafieldReferenceEdge#field-MetafieldReferenceEdge.fields.node) OBJECT An auto-generated type which holds one MetafieldReference and a cursor during pagination. * [Metaobject​Field.reference](https://shopify.dev/docs/api/customer/latest/objects/MetaobjectField#field-MetaobjectField.fields.reference) OBJECT Provides the value of a Metaobject field. *** ```graphql union MetafieldReference = GenericFile | MediaImage | Metaobject | Model3d | Video ```