younifyd
Menu

metaobjectUpdate

Updates a Metaobject with new field values, handle, or capabilities. Metaobjects are custom data structures that extend Shopify's data model.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the metaobjectUpdate action (under Metaobject).
  3. Fill in the fields below, then reference the result from later steps as {{metaobjectupdate.response.data}}.

Query

This is the mutation the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
mutation MetaobjectUpdate($id: ID!, $metaobject: MetaobjectUpdateInput!) {
  metaobjectUpdate(id: $id, metaobject: $metaobject) {
    metaobject {
      capabilities {
        onlineStore
        publishable
      }
      createdAt
      createdBy {
        apiKey
        appStoreAppUrl
        appStoreDeveloperUrl
        availableAccessScopes
        banner
        description
        developerName
        developerType
        developerUrl
        embedded
        failedRequirements
        features
        feedback
        handle
        icon
        id
        installUrl
        installation
        isPostPurchaseAppInUse
        launchUrl
        navigationItems
        optionalAccessScopes
        previouslyInstalled
        pricingDetails
        pricingDetailsSummary
        privacyPolicyUrl
        publicCategory
        published
        requestedAccessScopes
        screenshots
        shopifyDeveloped
        title
        uninstallMessage
        uninstallUrl
        webhookApiVersion
      }
      createdByApp {
        apiKey
        appStoreAppUrl
        appStoreDeveloperUrl
        availableAccessScopes
        banner
        description
        developerName
        developerType
        developerUrl
        embedded
        failedRequirements
        features
        feedback
        handle
        icon
        id
        installUrl
        installation
        isPostPurchaseAppInUse
        launchUrl
        navigationItems
        optionalAccessScopes
        previouslyInstalled
        pricingDetails
        pricingDetailsSummary
        privacyPolicyUrl
        publicCategory
        published
        requestedAccessScopes
        screenshots
        shopifyDeveloped
        title
        uninstallMessage
        uninstallUrl
        webhookApiVersion
      }
      createdByStaff {
        accountType
        active
        email
        exists
        firstName
        id
        initials
        isShopOwner
        lastName
        locale
        name
        phone
        privateData
      }
      definition {
        access
        capabilities
        createdAt
        createdByApp
        createdByStaff
        description
        displayNameKey
        fieldDefinitions
        hasThumbnailField
        id
        metaobjectsCount
        name
        standardTemplate
        type
        updatedAt
      }
      displayName
      fields {
        definition
        jsonValue
        key
        reference
        thumbnail
        type
        value
      }
      handle
      id
      staffMember {
        accountType
        active
        email
        exists
        firstName
        id
        initials
        isShopOwner
        lastName
        locale
        name
        phone
        privateData
      }
      thumbnailField {
        definition
        jsonValue
        key
        reference
        thumbnail
        type
        value
      }
      type
      updatedAt
      values
    }
    userErrors {
      code
      elementIndex
      elementKey
      field
      message
    }
  }
}

Variables

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

idstringrequired

The ID of the metaobject to update.

metaobjectobjectrequired

Specifies parameters to update on the metaobject.

handlestring
fieldsarray<object>2 fields
capabilitiesobject2 fields
redirectNewHandleboolean
valuesstring
json
{
  "id": "string",
  "metaobject": {
    "handle": "string",
    "fields": [
      {
        "key": "string",
        "value": "string"
      }
    ],
    "capabilities": {
      "publishable": {
        "status": "string"
      },
      "onlineStore": {
        "templateSuffix": "string"
      }
    },
    "redirectNewHandle": false,
    "values": "string"
  }
}

Response

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

metaobjectobject
capabilitiesobject2 fields
createdAtstring
createdByobject35 fields
createdByAppobject35 fields
createdByStaffobject13 fields
definitionobject15 fields
displayNamestring
fieldsarray<object>
handlestring
idstring
staffMemberobject13 fields
thumbnailFieldobject7 fields
typestring
updatedAtstring
valuesstring
userErrorsarray<object>
codeobject
elementIndexobject
elementKeyobject
fieldobject
messageobject

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