Menu
metaobjects
Returns a paginated list of Metaobject entries 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…
Use it in a workflow
- Add a step and choose the Shopify Storefront connector.
- Pick the metaobjects action (under Metaobjects).
- Fill in the fields below, then reference the result from later steps as
{{metaobjects.response.data}}.
Query
This is the query the action sends by default. Edit it in the step's Query field to change which fields come back.
query Metaobjects($type: String!, $sortKey: String, $first: Int, $after: String, $last: Int, $before: String, $reverse: Boolean) {
metaobjects(
type: $type
sortKey: $sortKey
first: $first
after: $after
last: $last
before: $before
reverse: $reverse
) {
edges {
cursor
node {
fields
handle
id
onlineStoreUrl
seo
type
updatedAt
}
}
nodes {
fields {
key
reference
type
value
}
handle
id
onlineStoreUrl
seo {
description
title
}
type
updatedAt
}
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"type": "string",
"sortKey": "string",
"first": 0,
"after": "string",
"last": 0,
"before": "string",
"reverse": false
}
Response
Read the result with {{metaobjects.response.data.data.metaobjects}}. If the API returns errors, the step fails and they are at {{metaobjects.response.data.errors}}.
Need more? See the Shopify Storefront guide for connection setup and behaviour shared by every action.
Was this page helpful?