I'm reading through Pathom3 docs. First, congratulations on excellent tutorial and documentation! The built-in resolvers look very convenient. Have you considered a built-in Parameters resolver? I imagine it would be similar to the Environment resolver but examine [:ast :params]
thanks 🙂 do you have a use case in mind for the params resolver generator?
Bear in mind that I'm pretty new to Pathom2 and haven't explored Pathom3 beyond reading the docs. Here is what I was thinking: With parameter support, the smart map becomes an immutable, central computing object. I would assoc in parameters and ask for a result back - and it would do all of the hard work of figuring out how to string together functions (resolvers) to obtain the result. From a more mundane point of view, I have several resolvers that require parameters. It is inconvenient (and frankly a little weird) to inspect (-> env :ast :params) to obtain the information. Instead, it would be much more convenient to declare parameters as inputs to the resolver.
Carrying this last example just a little further, I guess that most resolvers that require the env
parameter only require it in order to access parameters. With a Parameter resolver, I imagine nearly all resolvers become a single arg function.
I don't have a firm reason to think this is a good thing but it feels like a move in the right direction.
at this moment I don't really see much usage on that sense, with any of the helpers you can already use params, maybe there is some misconception going on in our little chat here
if you have a concrete use case, we can discuss around it
Sounds good