This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-10-13
Channels
- # ai (5)
- # announcements (4)
- # babashka (34)
- # beginners (78)
- # biff (6)
- # calva (41)
- # cider (47)
- # clerk (1)
- # clj-commons (3)
- # clj-http (1)
- # clojure (72)
- # clojure-europe (51)
- # clojure-nl (1)
- # clojure-norway (87)
- # clojure-romania (1)
- # clojure-uk (5)
- # clojuredesign-podcast (2)
- # community-development (1)
- # conjure (2)
- # cursive (11)
- # datomic (6)
- # docker (4)
- # emacs (13)
- # exercism (20)
- # hyperfiddle (56)
- # matrix (6)
- # membrane (4)
- # nbb (11)
- # off-topic (88)
- # pathom (7)
- # pedestal (1)
- # polylith (20)
- # portal (16)
- # practicalli (1)
- # re-frame (13)
- # reagent (4)
- # reitit (2)
- # remote-jobs (7)
- # shadow-cljs (49)
- # sql (4)
While trying out following example from the docs:
(pco/defresolver full-name [{::keys [first-name last-name]}]
{::full-name (str first-name " " last-name)})
(def env (pci/register full-name))
(p.eql/process env
[{'(:>/bret {::first-name "Bret" ::last-name "Victor"})
[::full-name]}])
I get following error:
Execution error (ExceptionInfo) at com.wsscode.pathom3.connect.planner/verify-plan!* (planner.cljc:1694).
; Pathom can't find a path for the following elements in the query: [:com.vadelabs.bridge-restapi.core/full-name] at path [:>/bret]
Any ideas on how to fix it?Resolved it. Just needed to install _pbip_/placeholder-data-params
plugin.
Hi, I am trying to parallel process resolvers that take some time to resolve. For some reason when the resolvers have input, they are not being ran in parallel. Is there something that can be done about this?
This example takes 1 second
to resolve, as expected
(pco/defresolver parallel-1 [_ _]
{::pco/output [:parallel-1]}
(p/do!
(p/delay 1000)
{:parallel-1 1}))
(pco/defresolver parallel-2 [_ _]
{::pco/output [:parallel-2]}
(p/do!
(p/delay 1000)
{:parallel-2 2}))
(def p-env (-> {::p.a.eql/parallel? true} (pci/register [parallel-1 parallel-2])))
(comment
(let [start (js/Date.)]
(p/then
(p.a.eql/process p-env [:parallel-1 :parallel-2])
(fn [res]
(println res :took (- (.getTime (js/Date.)) start)))))
)
This example takes 2 seconds
to resolve
(pco/defresolver parallel-1 [_ _]
{::pco/input [:parallel-1/id]
::pco/output [:parallel-1/id
:parallel-1/value]}
(p/do!
(p/delay 1000)
{:parallel-1/id 1
:parallel-1/value "value"}))
(pco/defresolver parallel-2 [_ _]
{::pco/input [:parallel-2/id]
::pco/output [:parallel-2/id
:parallel-2/value]}
(p/do!
(p/delay 1000)
{:parallel-2/id 2
:parallel-2/value "value"}))
(def p-env
(-> {::p.a.eql/parallel? true}
(pci/register [parallel-1 parallel-2])))
(comment
(let [start (js/Date.)]
(p/then
(p.a.eql/process p-env [{[:parallel-1/id 1] [:parallel-1/value]}
{[:parallel-2/id 2] [:parallel-2/value]}])
(fn [res]
(println :took (- (.getTime (js/Date.)) start)))))
)
thanks for the report, I can confirm its a bug, its not parallelizing the idents
fixed on main
Thanks Wilker