Skip to main content

deploymentEvents

Subscribe to lifecycle events for a single deployment via WebSocket.

Receives a DeploymentEvent when the deployment is created or transitions status (e.g., PENDING → RUNNING → COMPLETED). For log deltas use deploymentLogs instead — this subscription does not fire on log appends.

Re-select whatever fields you need on deployment — Apollo will merge the payload into its cache by Deployment:id.

Requires project:view on the project that holds the deployment's instance. If you cannot view that project, for example after the instance moves or you lose access, events arrive as null.

graphql
subscription {
deploymentEvents(organizationId: "my-org", deploymentId: "a1b2c3...") {
... on Event { action timestamp }
... on DeploymentEvent {
deployment {
id
status
elapsedTime
}
}
}
}
graphql
deploymentEvents(
organizationId: ID!
deploymentId: ID!
): DeploymentEventsPayload

Arguments​

deploymentEvents.organizationId ● ID! non-null scalar {#organization-id}​

Your organization's unique identifier.

deploymentEvents.deploymentId ● ID! non-null scalar {#deployment-id}​

The deployment's unique identifier.

Type​

DeploymentEventsPayload union​

Events delivered by the deploymentEvents subscription.

A single-deployment feed. Fires on creation, every status transition, and every change to the deployment's stash entries. For log content, subscribe to deploymentLogs — log deltas don't travel on this feed.