Metaobject
Requires access scope.
An instance of custom structured data defined by a metaobject definition. Metaobjects store reusable content that extends beyond standard Shopify resources, such as size charts, author profiles, or custom content sections.
Each metaobject contains fields that match the types and validation rules specified in its definition. Metafield references can point to metaobjects, connecting custom data with products, collections, and other resources. If the definition has the renderable capability, then the seo field provides SEO metadata. If it has the capability, then the field returns the public URL.
Anchor to FieldsFields
- field (MetaobjectField)
- fields ([MetaobjectField!]!)
- handle (String!)
- id (ID!)
- onlineStoreUrl (URL)
- seo (MetaobjectSEO)
- type (String!)
- updatedAt (DateTime!)
- Anchor to fieldfield•Metaobject
Field Token access required Accesses a field of the object by key.
- •String!required
The key of the field.
Arguments
- •String!
- Anchor to fieldsfields•[Metaobject
Field!]! non-null Token access required All object fields with defined values. Omitted object keys can be assumed null, and no guarantees are made about field order.
- Anchor to handlehandle•String!non-null Token access required
The unique handle of the metaobject. Useful as a custom ID.
- •ID!non-null Token access required
A globally-unique ID.
- Anchor to onlineStoreUrlonline•URL
Store Url Token access required The URL used for viewing the metaobject on the shop's Online Store. Returns
nullif the metaobject definition doesn't have thecapability.- •Metaobject
SEO Token access required The metaobject's SEO information. Returns
nullif the metaobject definition doesn't have therenderablecapability.- Anchor to typetype•String!non-null Token access required
The type of the metaobject.
- Anchor to updatedAtupdated•Date
At Time! non-null Token access required The date and time when the metaobject was last updated.
Anchor to QueriesQueries
- metaobject (Metaobject)
- metaobjects (MetaobjectConnection!)
- •query
Retrieves a single
Metaobjectby either itsor itshandle.NoteWhen using the handle, you must also provide the metaobject type because handles are only unique within a type.
Note:When using the handle, you must also provide the metaobject type because handles are only unique within a type.
Note: When using the handle, you must also provide the metaobject type because handles are only unique within a type.
- •ID
The ID of the metaobject.
- Anchor to handlehandle•Metaobject
Handle Input The handle and type of the metaobject.
Arguments
- •query
Returns a paginated list of
Metaobjectentries for a specific type. Metaobjects are custom data structures that extend Shopify's data model with merchant-defined or app-defined content like size charts, product highlights, or custom sections.The required
typeargument specifies which metaobject type to retrieve. You can sort results byidorusing theargument.- Anchor to typetype•String!required
The type of metaobject to retrieve.
- Anchor to sortKeysort•String
Key The key of a field to sort with. Supports "id" and "updated_at".
- Anchor to firstfirst•Int
Returns up to the first
nelements from the list.- Anchor to afterafter•String
Returns the elements that come after the specified cursor.
- Anchor to lastlast•Int
Returns up to the last
nelements from the list.- Anchor to beforebefore•String
Returns the elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments