pathom

:pathom: https://github.com/wilkerlucio/pathom/ & https://pathom3.wsscode.com & https://roamresearch.com/#/app/wsscode
pithyless 2020-10-12T10:56:24.089100Z

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?

wilkerlucio 2020-10-12T18:38:54.089200Z

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?

wilkerlucio 2020-10-12T19:05:46.090Z

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/

1🎉
wilkerlucio 2020-10-12T19:08:18.092700Z

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.

12❤️
wilkerlucio 2020-10-13T16:24:08.098300Z

there was a bug with implicit inputs on alpha13, please update to alpha15 to fix

mpenet 2020-10-12T20:14:00.093300Z

Nice! I am eager to try v3