Fork me on GitHub
#pathom
<
2020-10-24
>
lilactown19:10:58

not sure if this is the right place, but the EQL cljdocs site is broken atm

wilkerlucio14:10:11

thanks, reporting here works, there is also #eql

dehli22:10:03

Hi, I have a mutation that I’d like to take both ::pc/input and ::pc/params (where I’d like the ::pc/input the be an attribute that’s globally resolvable). I’ve tried to get this to work but the input isn’t resolving. Is this supported? Thanks!

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

cjmurphy01:10:42

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

👍 6
souenzzo01:10:35

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}))

👍 6
dehli02:10:40

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