Requires Any of write_content, write_online_store_pages access scopes.

Updates a blog.


The properties of the blog to be updated.

Anchor to id
id
required

The ID of the blog to be updated.


Was this section helpful?

The blog that was updated.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation blogUpdate($blog: BlogUpdateInput!, $id: ID!) {
  blogUpdate(blog: $blog, id: $id) {
    blog {
      # Blog fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "blog": {
    "commentPolicy": "AUTO_PUBLISHED",
    "handle": "<your-handle>",
    "metafields": [
      {
        "description": "<your-description>",
        "id": "gid://shopify/<objectName>/10079785100",
        "key": "<your-key>",
        "namespace": "<your-namespace>",
        "type": "<your-type>",
        "value": "<your-value>"
      }
    ],
    "redirectArticles": true,
    "redirectNewHandle": true,
    "templateSuffix": "<your-templateSuffix>",
    "title": "<your-title>"
  },
  "id": "gid://shopify/<objectName>/10079785100"
}
input BlogUpdateInput {
  commentPolicy: CommentPolicy
  handle: String
  metafields: [MetafieldInput!]
  redirectArticles: Boolean
  redirectNewHandle: Boolean
  templateSuffix: String
  title: String
}

input MetafieldInput {
  description: String
  id: ID
  key: String
  namespace: String
  type: String
  value: String
}