Learn how to create and manage webhooks for your subgraphs to receive real-time updates.
INSERT
, UPDATE
, or DELETE
operation. This is useful for triggering backend processes, sending notifications, or syncing data with external systems.
entity.save()
(resulting in an INSERT
or UPDATE
) or an entity is removed (resulting in a DELETE
), the change is recorded. A real-time watcher detects this update and sends a payload to your configured webhook URL. The payload will indicate the type of operation: INSERT
, UPDATE
, or DELETE
.
webhook_demo
).approved
).op
(string): The type of operation that triggered the webhook. Possible values are "INSERT"
, "UPDATE"
, or "DELETE"
.data_source
(string): Identifier for the subgraph or indexer being tracked.data
(object): Contains the actual entity data that changed. It has two sub-fields:
old
(object | null): The state of the entity before the change. This will be null
if the op
is "INSERT"
.new
(object | null): The state of the entity after the change. This will be null
if the op
is "DELETE"
.webhook_name
(string): The name you assigned to your webhook during creation.webhook_id
(string): A unique identifier for the webhook configuration.id
(string): A unique identifier for this specific event notification.delivery_info
(object): Information about the delivery attempt for this webhook. It has two sub-fields:
max_retries
(integer): The maximum number of retry attempts configured for this webhook.current_retry
(integer): The current retry attempt number for this specific event (0 for the initial attempt).entity
(string): The name of the subgraph entity being tracked.INSERT
operation:
UPDATE
operation :