Supported reference types
The schema supports the following reference types with full data normalization:Normalized reference shapes
Each reference type is normalized into a small, consistent object. Transport-only fields like__typename are always removed. The shape you receive depends on the type of referenced resource.
Metaobject references are resolved into a structure with the metaobject’s core identifiers and a key-value map of its fields:
Media image references (including
file_reference metafields that point to images) are normalized to:
Taxonomy value references are normalized to:
Video references are normalized to:
Nested metaobject resolution
When a metaobject field references another metaobject (viametaobject_reference or list.metaobject_reference), Layers automatically resolves the nested reference from its local cache. This happens recursively up to 5 levels deep, with circular reference protection to prevent infinite loops.
This is useful for data models where metaobjects reference other metaobjects. For example, a “Product Spec” metaobject that references a “Material” metaobject, which in turn references a “Certification” metaobject.
Non-reference fields are returned as their plain values (strings, numbers, etc.). If a referenced metaobject is not found in the cache, the reference data from Shopify is still normalized into the standard shape.
Example: metaobject reference response
Example: list metaobject reference response
Example: media image reference response
Example: nested metaobject reference response
In this example, a product has a “material” metafield that references a Material metaobject, which itself has a “certification” field referencing a Certification metaobject:Metaobject data is resolved from a local cache that is kept in sync with Shopify via webhooks. If a referenced metaobject is not found in the cache, Layers normalizes the original reference data from Shopify’s GraphQL response into the standard shape, or falls back to the numeric ID if no reference data is available.