Skip to content

Commit bb741b3

Browse files
committed
Add Available Queries section to human_in_the_loop README
1 parent a68e14c commit bb741b3

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

langgraph_plugin/human_in_the_loop/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,41 @@ Uses `run_in_workflow=True` to access Temporal operations directly in graph node
3232
| Graph portability | Higher | Lower |
3333
| Workflow complexity | More code | Less code |
3434
| Temporal API access | Indirect | Direct |
35+
36+
## Available Queries
37+
38+
Both samples expose these queries for monitoring workflow progress:
39+
40+
```bash
41+
# Get workflow status
42+
temporal workflow query --workflow-id <id> --type get_status
43+
# Returns: "processing" | "waiting_for_approval" | "approved" | "rejected"
44+
45+
# Get pending approval details
46+
temporal workflow query --workflow-id <id> --type get_pending_approval
47+
48+
# Get ASCII diagram of graph execution progress
49+
temporal workflow query --workflow-id <id> --type get_graph_ascii
50+
# Output:
51+
# ┌───────────────────┐
52+
# │ START │ ✓
53+
# └─────────┬─────────┘
54+
#
55+
#
56+
# ┌───────────────────┐
57+
# │ request_approval │ ▶ INTERRUPTED
58+
# └─────────┬─────────┘
59+
#
60+
#
61+
# ┌───────────────────┐
62+
# │ END │ ○
63+
# └───────────────────┘
64+
# Legend: ✓ completed ▶ current/interrupted ○ pending
65+
66+
# Get Mermaid diagram (renders in GitHub, Notion, etc.)
67+
temporal workflow query --workflow-id <id> --type get_graph_mermaid
68+
69+
# Get full typed state
70+
temporal workflow query --workflow-id <id> --type get_graph_state
71+
# Returns: { values: ApprovalState, next: [...], step: N, interrupted: bool, ... }
72+
```

0 commit comments

Comments
 (0)