This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-13
Channels
- # announcements (1)
- # babashka (12)
- # beginners (10)
- # biff (9)
- # calva (2)
- # cherry (21)
- # cider (14)
- # clj-commons (76)
- # clj-kondo (8)
- # clj-on-windows (34)
- # cljs-dev (5)
- # clojure (48)
- # clojure-austin (7)
- # clojure-europe (97)
- # clojure-nl (1)
- # clojure-norway (14)
- # clojure-uk (22)
- # clojurescript (137)
- # conjure (33)
- # cursive (4)
- # datalevin (1)
- # deps-new (4)
- # devcards (2)
- # duct (3)
- # events (1)
- # fulcro (12)
- # graphql (9)
- # hyperfiddle (16)
- # jobs (8)
- # kaocha (1)
- # leiningen (6)
- # lsp (39)
- # malli (38)
- # membrane (20)
- # nbb (68)
- # observability (7)
- # off-topic (49)
- # pathom (11)
- # polylith (8)
- # portal (22)
- # re-frame (6)
- # releases (1)
- # remote-jobs (2)
- # shadow-cljs (24)
- # spacemacs (2)
- # squint (6)
- # xtdb (7)
Update simplifying my transaction to [(com.example.client.mutations/create-random-thing {:tmpid #fulcro/tempid["08fd736d-d3cc-4270-9980-08534c8bd7a2"]})]
makes it work. Perhaps it is just another case of https://github.com/wilkerlucio/pathom3/issues/156
Hello! I am clearly missing something obvious here. I am sending the mutation
[{(com.example.client.mutations/create-random-thing
{:tmpid #fulcro/tempid["08fd736d-d3cc-4270-9980-08534c8bd7a2"]})
[:com.wsscode.pathom3.connect.runner/attribute-errors]}]
and getting back
{com.example.client.mutations/create-random-thing
{:com.wsscode.pathom3.connect.runner/attribute-errors
{:com.wsscode.pathom3.connect.runner/attribute-errors
{:com.wsscode.pathom3.error/cause
:com.wsscode.pathom3.error/attribute-unreachable}}}}
despite having defined
(pco/defmutation create-random-thing [env {:keys [tmpid] :as params}]
{::pco/op-name 'com.example.client.mutations/create-random-thing
;::pco/params [:tempid]
::pco/output [:tempids]}
(println "SERVER: Simulate creating a new thing with real DB id 123" tmpid)
{:tempids {tmpid 123}})
which I see is called from the println. What am I doing wrong? 🙏the issue here is that attribute-errors come after processing, so they are not something you ask in the query (in the sense that the planner will consider something missing), that was the thinking, but you are pointing a case that makes sense, the client will ask for it, as a hack I believe if you just add an (pbir/constantly-resolver ::pcr/attribute-errors nil)
it might work, but its no good really, can you please open an issue for that?
oh, sorry, there is an issue already :man-facepalming:
doing some experiments
I think the add of the constantly resolve is a fine solution, what I'll do is make that automatic on lenient mode, since there is no point to it on strict mode
in case you wanna replicate, this is the extra resolver that fixes it:
(-> (pbir/constantly-resolver :com.wsscode.pathom3.connect.runner/attribute-errors {})
(pco/update-config assoc ::pco/op-name (symbol "com.wsscode.pathom3.connect.runner" (str (gensym "attribute-errors")))))
(I'm doing random name generation just because in case of graph integration I can't have resolver names colliding)
Awesome, thx a lot!