Is there some way of passing additional data with ::p/continue
? I'd like to have several resolvers with different authentication strategies try to resolve the same attribute (and ::p/continue
if they fail); and ideally I'd like to differentiate between ::p/not-found
and ::auth/forbidden
if they all fail. If this is currently not feasible, is this a use-case that can be considered for the upcoming new reader?
maybe using error instead of continue, similar to "continue", an error will trigger other options, and in a post-process you can convert those errors in forbidden, makes sense?
hello everyone, I wrote a post about some of the updates about Pathom 3, you can find it at: https://blog.wsscode.com/pathom-updates-01/
another news, I recently released [com.wsscode.pathom "2.3.0-alpha13"]
🎉, this version ports back the defresolver
from Pathom 3 to Pathom 2, this defresolver reduces the boilerplate required on some resolvers, it can make some inputs and outputs implicit, for example:
; before alpha13
(pc/defresolver full-name [env {::keys [first-name last-name]}]
{::pc/input #{::first-name ::last-name}
::pc/output [::full-name]}
{::full-name (str first-name " " last-name)})
; after alpha13, this can reduce to
(pc/defresolver full-name [{::keys [first-name last-name]}]
{::full-name (str first-name " " last-name)})
Check the defresolver
docstring for details of the syntax.there was a bug with implicit inputs on alpha13, please update to alpha15 to fix
Nice! I am eager to try v3