younifyd
Menu

metaobject

Retrieves a single Metaobject by either its global ID or its handle. Note: When using the handle, you must also provide the metaobject type because handles are only unique within a type.

Use it in a workflow

  1. Add a step and choose the Shopify Storefront connector.
  2. Pick the metaobject action (under Metaobject).
  3. Fill in the fields below, then reference the result from later steps as {{metaobject.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.

graphql
query Metaobject($id: ID, $handle: MetaobjectHandleInput) {
  metaobject(id: $id, handle: $handle) {
    fields {
      key
      reference
      type
      value
    }
    handle
    id
    onlineStoreUrl
    seo {
      description {
        key
        reference
        type
        value
      }
      title {
        key
        reference
        type
        value
      }
    }
    type
    updatedAt
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

idstring

The ID of the metaobject.

handleobject

The handle and type of the metaobject.

handlestringrequired
typestringrequired
json
{
  "id": "string",
  "handle": {
    "handle": "string",
    "type": "string"
  }
}

Response

Read the result with {{metaobject.response.data.data.metaobject}}. If the API returns errors, the step fails and they are at {{metaobject.response.data.errors}}.

fieldsarray<object>
keyobject
referenceobject
typeobject
valueobject
handlestring
idstring
onlineStoreUrlstring
seoobject
descriptionobject4 fields
titleobject4 fields
typestring
updatedAtstring

Need more? See the Shopify Storefront guide for connection setup and behaviour shared by every action.

Was this page helpful?