This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-14
Channels
- # ai (3)
- # babashka (45)
- # beginners (81)
- # biff (26)
- # calva (10)
- # cider (5)
- # clj-kondo (55)
- # cljfx (6)
- # clojure (125)
- # clojure-berlin (1)
- # clojure-europe (37)
- # clojure-italy (7)
- # clojure-nl (3)
- # clojure-norway (79)
- # clojure-uk (1)
- # clojurescript (63)
- # clojutre (1)
- # conjure (5)
- # cursive (37)
- # data-science (1)
- # datalevin (4)
- # datomic (28)
- # eastwood (6)
- # fulcro (26)
- # graphql (20)
- # honeysql (6)
- # humbleui (4)
- # jobs-discuss (5)
- # kaocha (1)
- # leiningen (8)
- # missionary (5)
- # nbb (4)
- # observability (3)
- # off-topic (7)
- # pathom (8)
- # podcasts-discuss (1)
- # rewrite-clj (18)
- # ring (6)
- # sci (23)
- # scittle (9)
- # shadow-cljs (49)
- # squint (10)
- # testing (11)
- # xtdb (17)
Hello there, does anyone have any insight as to why this first defresolver
works but the 2nd ends up in an unread?
Working:
(pc/defresolver process-batch [{:keys [ast]} _params]
{::pc/input #{}
::pc/output [:batch-jobs/process-batch]}
{:batch-jobs/process-batch (auth/batch-process! (get-in ast [:params :payload]))})
Not Working:
(pc/defresolver process-batch [{:keys [ast]} _params]
{::pc/input #{}
::pc/outuput [:batch-jobs/process-batch]}
(let [payload (get-in ast [:params :payload])]
{:batch-jobs/process-batch (auth/batch-process! payload)}))
You have a typo: ::pc/outuput
In the first case pathom can infer the attributes you produce by itiself, because you return a map directly.
so for the 2nd one (not working), should I be more explicit about the map that this endpoint returns?
not sure why it wouldn't work, the code looks equivalent to me, can you send a complete repro? maybe the problem is somewhere else
(and I see you calling it batch, but I don't see the ::pc/batch? true
flag, wondering if you are trying to use batch somehow, or its just a name coincidence)