-
Notifications
You must be signed in to change notification settings - Fork 15
refactor: change step handler input to use asymmetric pattern for better type safety #556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: change step handler input to use asymmetric pattern for better type safety #556
Conversation
|
|
View your CI Pipeline Execution ↗ for commit 85fb718
☁️ Nx Cloud last updated this comment at |
86ca44b to
b47e937
Compare
b47e937 to
f182e2d
Compare
a13db51 to
ff6500d
Compare
- Root steps receive flowInput directly (no run key wrapper) - Dependent steps receive deps object only, flowInput via context - Add flowInput to FlowContext type - Update all type tests and example flows - Update edge-worker and client packages for compatibility
f182e2d to
85fb718
Compare
🚀 Production Deployment: Website✅ Successfully deployed to production! 🔗 Production URL: https://pgflow.dev 📝 Details:
Deployed at: 2025-12-30T12:40:25+01:00 |

Asymmetric Step Input Pattern for Improved Type Safety and Composition
This PR introduces a significant improvement to the step input pattern across the PgFlow DSL:
runwrapper)context.flowInput)This change enables better functional composition where subflows can receive typed inputs without the
runwrapper that previously blocked type matching. The asymmetric input pattern makes the API more intuitive while maintaining full type safety.Key Changes:
StepInpututility type to implement the asymmetric patternflowInputinstead ofinput.runflowInputto theFlowContextinterface for dependent stepsThis change is backward compatible at runtime but will require updating handler parameter names in client code. The improved type safety and composability are worth the minor migration effort.