Skip to main content

Blog

Requires one of the read_content or read_online_store_pages access scopes.

Subscribe to field-level changes on the Blog GraphQL Admin API object. You can subscribe to create, delete, and update events, as well as changes to specific fields.

Each topic corresponds to a commerce resource that can exist independently within its domain. Child entities that depend on a parent within the same domain don't have their own topic. Instead, changes to child entities trigger a delivery on the parent topic. Calculated fields, derived fields, auto-updated timestamps, and cross-domain fields aren't available as triggers.

shopify.app.toml

[events]
api_version = "unstable"

[[events.subscription]]
handle = "my_blog_event"

topic = "Blog"
actions = ["update"]
triggers = ["blog.commentPolicy"]

uri = "https://your-app.com/events"

query = """
query blog_event_payload($blogId: ID!) {
blog(id: $blogId) {
id
title
handle
commentPolicy
}
}
"""

Field-level triggers for Blog subscriptions.

All triggers require one of the read_content or read_online_store_pages access scopes. Those triggers that require additional scopes are documented where relevant. Deprecated triggers are listed last.

Subscriptions can include multiple triggers. Use the shopify-webhook-id header for deduplication when handling duplicate deliveries.

Custom queries aren't limited to Blog. They can query the full GraphQL Admin API.

Anchor to list-of-topics-blog.*
blog.*

Fires when events involve the Blog object.

The "create" and "delete" actions are only relevant within the context of this parent topic. Use fields_changed to follow or replicate impacted data after a delete event. Define a custom query to retrieve specific fields from create events.

blog.* is a parent trigger. Subscribing with the "update" action receives events for all supported triggers under blog, including nested triggers. Use a more specific trigger to limit events to the fields you need.

Variables: blogId

Anchor to list-of-topics-blog.commentPolicy
blog.commentPolicy

Fires when the commentPolicy field on the Blog object changes.

Subscribe to this trigger with the "update" action and include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

Indicates whether readers can post comments to the blog and if comments are moderated or not.

Variables: blogId

Anchor to list-of-topics-blog.feed
blog.feed

Fires when the feed field on the Blog object changes.

Subscribe to this trigger with the "update" action and include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

FeedBurner provider details.

Variables: blogId

Anchor to list-of-topics-blog.handle
blog.handle

Fires when the handle field on the Blog object changes.

Subscribe to this trigger with the "update" action and include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

The handle field represents a unique, human-friendly string for the blog.

Variables: blogId

Anchor to list-of-topics-blog.metafield(namespace: String!, key: String!).*
blog.metafield(namespace: String!, key: String!).*

Fires when the metafield field on the Blog object changes.

blog.metafield(namespace: String!, key: String!).* is a parent trigger. Subscribing with the "update" action receives events for all supported triggers under blog.metafield(namespace: String!, key: String!), including nested triggers. Use a more specific trigger to limit events to the fields you need.

Include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

The metafield field represents a custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.

Variables: blogId, metafieldKey, metafieldNamespace

Anchor to list-of-topics-blog.metafield(namespace: String!).*
blog.metafield(namespace: String!).*

Fires when the metafield field on the Blog object changes.

blog.metafield(namespace: String!).* is a parent trigger. Subscribing with the "update" action receives events for all supported triggers under blog.metafield(namespace: String!), including nested triggers. Use a more specific trigger to limit events to the fields you need.

Include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

This subscription omits the optional argument metafield.key.

The metafield field represents a custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.

Variables: blogId, metafieldKey, metafieldNamespace

Anchor to list-of-topics-blog.metafield(namespace: String!, key: String!).value
blog.metafield(namespace: String!, key: String!).value

Fires when the value field on the Metafield object changes.

Subscribe to this trigger with the "update" action and include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

The value field represents the data stored in the metafield.

Variables: blogId, metafieldKey, metafieldNamespace

Anchor to list-of-topics-blog.metafield(namespace: String!).value
blog.metafield(namespace: String!).value

Fires when the value field on the Metafield object changes.

Subscribe to this trigger with the "update" action and include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

This subscription omits the optional argument metafield.key.

The value field represents the data stored in the metafield.

Variables: blogId, metafieldKey, metafieldNamespace

Anchor to list-of-topics-blog.templateSuffix
blog.templateSuffix

Fires when the templateSuffix field on the Blog object changes.

Subscribe to this trigger with the "update" action and include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

The templateSuffix field represents the name of the template a blog is using if it's using an alternate template.

Variables: blogId

Anchor to list-of-topics-blog.title
blog.title

Fires when the title field on the Blog object changes.

Subscribe to this trigger with the "update" action and include the field in a custom query to retrieve updated data from the payload. You can trace the field in subsequent requests using fields_changed.

The title field represents the title of the blog.

Variables: blogId


Was this page helpful?