pathom

:pathom: https://github.com/wilkerlucio/pathom/ & https://pathom3.wsscode.com & https://roamresearch.com/#/app/wsscode
cjmurphy 2020-10-25T01:31:42.189Z

inputs are not supported for mutations as they are for resolvers. 😞

👍 2
souenzzo 2020-10-25T01:32:35.189600Z

Just call the parser from the mutation

(pc/defmutation send-login-email
  [{:keys [parser] :as env} {:app/keys [origin] :login/keys [email]}]
  {::pc/sym 'login/send-email
   ::pc/params [:login/email]
   ::pc/output [:login/sent]}
  (go
    (<! (send-email {:email email :origin (:app/origin (<! (parser env [:app/origin])}))))
    {:login/sent true}))

👍 2
dehli 2020-10-25T02:20:40.190100Z

Ooohhh, that's awesome! Didnt realize I could do that. Thanks!