Metaobject
Requires access scope.
An instance of a user-defined model based on a MetaobjectDefinition.
Anchor to FieldsFields
- 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
- •query
Fetch a specific Metaobject by one of its unique identifiers.
- •ID
The ID of the metaobject.
- Anchor to handlehandle•Metaobject
Handle Input The handle and type of the metaobject.
Arguments
- •query
All active metaobjects for the shop.
- 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