younifyd
Menu

metaobjectDefinition

Retrieves a MetaobjectDefinition by its global ID. Metaobject definitions provide the structure and fields for metaobjects.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the metaobjectDefinition action (under Metaobject).
  3. Fill in the fields below, then reference the result from later steps as {{metaobjectdefinition.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 MetaobjectDefinition($id: ID!) {
  metaobjectDefinition(id: $id) {
    access {
      admin
      customerAccount
      storefront
    }
    capabilities {
      onlineStore {
        data
        enabled
      }
      publishable {
        enabled
      }
      renderable {
        data
        enabled
      }
      translatable {
        enabled
      }
    }
    createdAt
    createdByApp {
      apiKey
      appStoreAppUrl
      appStoreDeveloperUrl
      availableAccessScopes {
        description
        handle
      }
      banner {
        altText
        height
        id
        originalSrc
        src
        thumbhash
        width
      }
      description
      developerName
      developerType
      developerUrl
      embedded
      failedRequirements {
        action
        message
      }
      features
      feedback {
        app
        channel
        feedbackGeneratedAt
        link
        messages
        state
      }
      handle
      icon {
        altText
        height
        id
        originalSrc
        src
        thumbhash
        width
      }
      id
      installUrl
      installation {
        accessScopes
        activeSubscriptions
        app
        channel
        id
        launchUrl
        publication
        subscriptions
        uninstallUrl
      }
      isPostPurchaseAppInUse
      launchUrl
      navigationItems {
        id
        title
        url
      }
      optionalAccessScopes {
        description
        handle
      }
      previouslyInstalled
      pricingDetails
      pricingDetailsSummary
      privacyPolicyUrl
      publicCategory
      published
      requestedAccessScopes {
        description
        handle
      }
      screenshots {
        altText
        height
        id
        originalSrc
        src
        thumbhash
        width
      }
      shopifyDeveloped
      title
      uninstallMessage
      uninstallUrl
      webhookApiVersion
    }
    createdByStaff {
      accountType
      active
      email
      exists
      firstName
      id
      initials
      isShopOwner
      lastName
      locale
      name
      phone
      privateData {
        accountSettingsUrl
        createdAt
        permissions
      }
    }
    description
    displayNameKey
    fieldDefinitions {
      capabilities {
        adminFilterable
      }
      description
      key
      name
      required
      type {
        category
        name
        supportedValidations
        supportsDefinitionMigrations
        valueType
      }
      validations {
        name
        type
        value
      }
    }
    hasThumbnailField
    id
    metaobjectsCount
    name
    standardTemplate {
      access {
        admin
        customerAccount
        storefront
      }
      description
      displayNameKey
      enabledCapabilities {
        capabilityType
      }
      fieldDefinitions {
        description
        key
        name
        required
        type
        validations
        visibleToStorefrontApi
      }
      name
      type
    }
    type
    updatedAt
  }
}

Variables

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

idstringrequired

The ID of the metaobject to return.

json
{
  "id": "string"
}

Response

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

accessobject
adminstring

One ofPRIVATEMERCHANT_READMERCHANT_READ_WRITEPUBLIC_READPUBLIC_READ_WRITE

customerAccountstring

One ofNONEREAD

storefrontstring

One ofNONEPUBLIC_READ

capabilitiesobject
onlineStoreobject2 fields
publishableobject1 fields
renderableobject2 fields
translatableobject1 fields
createdAtstring
createdByAppobject
apiKeystring
appStoreAppUrlstring
appStoreDeveloperUrlstring
availableAccessScopesarray<object>
bannerobject7 fields
descriptionstring
developerNamestring
developerTypestring

One ofSHOPIFYPARTNERMERCHANTUNKNOWN

developerUrlstring
embeddedboolean
failedRequirementsarray<object>
featuresarray<object>
feedbackobject6 fields
handlestring
iconobject7 fields
idstring
installUrlstring
installationobject9 fields
isPostPurchaseAppInUseboolean
launchUrlstring
navigationItemsarray<object>
optionalAccessScopesarray<object>
previouslyInstalledboolean
pricingDetailsstring
pricingDetailsSummarystring
privacyPolicyUrlstring
publicCategorystring

One ofPRIVATEPUBLICCUSTOMOTHER

publishedboolean
requestedAccessScopesarray<object>
screenshotsarray<object>
shopifyDevelopedboolean
titlestring
uninstallMessagestring
uninstallUrlstring
webhookApiVersionstring
createdByStaffobject
accountTypestring

One ofREGULARRESTRICTEDINVITEDREQUESTEDCOLLABORATORCOLLABORATOR_TEAM_MEMBERSAMLINVITED_STORE_OWNER

activeboolean
emailstring
existsboolean
firstNamestring
idstring
initialsarray<object>
isShopOwnerboolean
lastNamestring
localestring
namestring
phonestring
privateDataobject3 fields
descriptionstring
displayNameKeystring
fieldDefinitionsarray<object>
capabilitiesobject
descriptionobject
keyobject
nameobject
requiredobject
typeobject
validationsobject
hasThumbnailFieldboolean
idstring
metaobjectsCountnumber
namestring
standardTemplateobject
accessobject3 fields
descriptionstring
displayNameKeystring
enabledCapabilitiesarray<object>
fieldDefinitionsarray<object>
namestring
typestring
typestring
updatedAtstring

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