Multi-stage queries in REST API#126
Conversation
43e5d75 to
8e7c483
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughREST ChangesMulti-stage query DAG and inline source model support
Sequence DiagramsequenceDiagram
participant Client
participant Handler
participant Engine
Client->>Handler: POST /query with body
alt body has "queries" field
Handler->>Handler: Validate non-empty queries
Handler->>Engine: execute(query=list(queries), variables=..., dry_run=..., explain=...)
Engine->>Engine: Auto-sort stages (DAG)
Engine->>Engine: Detect cycles
else body has "query" field or run name
Handler->>Handler: Validate QueryRequest shape
Handler->>Engine: execute_query_request(source_model=str\|dict, ...)
end
Engine-->>Handler: result or error
Handler-->>Client: response with SQL/result or 400 cycle error
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|



Summary by CodeRabbit
New Features
/queryendpoint now supports multi-stage DAG queries alongside single-stage queries, with automatic stage ordering.Documentation