NodeWorkflowService

nodeWorkflowService Query

Audience: Programmer

Fetches a workflow-related object given its ID. This query follows the Relay Global Object Identification Specification and can retrieve any object that implements the NodeWorkflowService interface.

Arguments

Name
Type
Description

id

ID!

The unique identifier of the workflow object to retrieve

Return Type

NodeWorkflowService - An interface that returns an object implementing the NodeWorkflowService interface. This includes:

  • Workflow - A Temporal workflow instance with execution details

  • WorkflowSignal - A signal that can be sent to a running workflow

Usage Example

GraphQL Query

query GetWorkflowObject($id: ID!) {
  nodeWorkflowService(id: $id) {
    id
    ... on Workflow {
      workflowID
      runID
      workflowType
      status
      startTime
      endTime
      execution
      memo
      searchAttributes
      createdAt
      updatedAt
    }
    ... on WorkflowSignal {
      signalName
      workflowID
      runID
      payload
      status
      createdAt
      updatedAt
    }
  }
}

Query Variables

JavaScript Example

Type Detection

Use the __typename field to determine which specific type was returned:

Common Use Cases

Monitor Workflow Status

Last updated

Was this helpful?