Open Taskeren opened 2 weeks ago
Thanks for the idea, although I'm not sure if I fully agree - at least enough to introduce a breaking change to all resolvers, even in a pre-1.0.0 version.
I personally haven't had such issues so far but I usually keep my resolvers short and delegate complex work to dedicated services. I do like making the context more easily available but there might be other (non-breaking) options as well.
I'll leave this open to foster a discussion and let others join if interested.
In current resolver DSLs, It is not easy to tell what is returned in a complicated logic. I think there should be something like
emit
in Flow to return values, so that we can tell which value is returned at a glance.With this, it is also better to inject context without declaring it.
Also,
return@resolver "My Value"
looks ugly, but it works.