metaObjectService fetches metaobjects by handle or by type. Use it when your extension needs reusable content or structured data stored as metaobjects.
Global name
API
Methods
getMetaObjectByHandle
Fetches a metaobject by type and handle.null when the metaobject is not found.
getMetaObjectsByType
Fetches one page of metaobjects of a type. Pass the previous page’sendCursor as after to fetch the next page.
getAllMetaObjectsByType
Fetches every metaobject of a type in one call, with no limit. Use it only when you know the shop has few metaobjects of that type; otherwise usegetMetaObjectsByType.
MetaObject
fields is keyed by field key, without a namespace. See ProductService for the MetaFieldValue types.