Menu
metaobjectDefinitionUpdate
Updates a MetaobjectDefinition's configuration and field structure. You can modify the definition's name, description, display name key, access controls, and capabilities, as well as those of all its fields.
Use it in a workflow
- Add a step and choose the Shopify connector.
- Pick the metaobjectDefinitionUpdate action (under Metaobject).
- Fill in the fields below, then reference the result from later steps as
{{metaobjectdefinitionupdate.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.
mutation MetaobjectDefinitionUpdate($id: ID!, $definition: MetaobjectDefinitionUpdateInput!) {
metaobjectDefinitionUpdate(id: $id, definition: $definition) {
metaobjectDefinition {
access {
admin
customerAccount
storefront
}
capabilities {
onlineStore
publishable
renderable
translatable
}
createdAt
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
}
description
displayNameKey
fieldDefinitions {
capabilities
description
key
name
required
type
validations
}
hasThumbnailField
id
metaobjectsCount
name
standardTemplate {
access
description
displayNameKey
enabledCapabilities
fieldDefinitions
name
type
}
type
updatedAt
}
userErrors {
code
elementIndex
elementKey
field
message
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"id": "string",
"definition": {
"name": "string",
"description": "string",
"fieldDefinitions": [
{
"create": "string",
"update": "string",
"delete": "string"
}
],
"access": {
"admin": "MERCHANT_READ",
"storefront": "NONE",
"customerAccount": "NONE"
},
"displayNameKey": "string",
"resetFieldOrder": false,
"capabilities": {
"publishable": {
"enabled": "string"
},
"translatable": {
"enabled": "string"
},
"renderable": {
"enabled": "string",
"data": "string"
},
"onlineStore": {
"enabled": "string",
"data": "string"
}
}
}
}
Response
Read the result with {{metaobjectdefinitionupdate.response.data.data.metaobjectDefinitionUpdate}}. If the API returns errors, the step fails and they are at {{metaobjectdefinitionupdate.response.data.errors}}.
Need more? See the Shopify guide for connection setup and behaviour shared by every action.
Was this page helpful?