metaobject
Requires access scope.
Retrieves a single Metaobject by either its or its handle.
When using the handle, you must also provide the metaobject type because handles are only unique within a type.
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.
Arguments
- handle (MetaobjectHandleInput)
- id (ID)
- Anchor to handlehandle•Metaobject
Handle Input The handle and type of the metaobject.
- •ID
The ID of the metaobject.
Anchor to Possible returnsPossible returns
- Metaobject (Metaobject)
- Anchor to MetaobjectMetaobject•Metaobject
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.
Metafieldreferences can point to metaobjects, connecting custom data with products, collections, and other resources. If the definition has therenderablecapability, then theseofield provides SEO metadata. If it has thecapability, then thefield returns the public URL.- 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.