This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-01
Channels
- # announcements (14)
- # architecture (30)
- # aws (34)
- # babashka (18)
- # beginners (114)
- # biff (5)
- # calva (128)
- # clerk (155)
- # clj-kondo (60)
- # clojure (82)
- # clojure-dev (25)
- # clojure-europe (20)
- # clojure-nl (1)
- # clojure-norway (17)
- # clojure-spec (13)
- # clojure-uk (3)
- # community-development (4)
- # core-logic (4)
- # cursive (5)
- # datomic (21)
- # deps-new (13)
- # emacs (5)
- # funcool (5)
- # graphql (3)
- # hyperfiddle (1)
- # introduce-yourself (1)
- # jobs (2)
- # kaocha (1)
- # london-clojurians (1)
- # lsp (13)
- # malli (16)
- # off-topic (6)
- # other-languages (1)
- # pathom (18)
- # re-frame (23)
- # releases (1)
- # remote-jobs (2)
- # tools-build (1)
- # tools-deps (12)
- # vscode (1)
- # xtdb (27)
I haven't followed https://github.com/wilkerlucio/pathom3/projects/1 to see how quickly it gets new things, but after this week release there doesn't seem to be much to do for Pathom3 anymore. Is it getting close to ready?
hello Tomi! yes, we are getting there! the API has been stable for a while, although Im gonna have a few breaking changes in the next release (on the placeholders entity data feature, see: https://github.com/wilkerlucio/pathom3/issues/187), the good news is that I'm doing it now to prepare to leave the alpha state. fully ready is probably never going to be. one feature that will prob need more development is the foreign parsers, they have their complexities and not many people AFAIK are trying it, so there is likely to be bugs there. but on the rest things seem to be running smoothly
this one was merged yesterday, but pretty minor, only if you are using the ::p.error/missing-output
error cause for some special treatment you will be affected: https://github.com/wilkerlucio/pathom3/issues/149
FYI, people that use Pathom with core.cache might want to look into https://ask.clojure.org/index.php/12567/multi-threaded-cache-stampede-in-core-cache, I see the https://pathom3.wsscode.com/docs/cache/#using-corecache would be vulnerable to the same issue (cache stampede)
I believe the fix is not hard, but I cannot fully confirm it as I havenât used the core.cache.wrapped myself yet. Conceptually Iâm pretty sure it is not hard to work around it though
that is great to know!
This is how I would solve it (and how I have been working without the wrapped namespace) https://ask.clojure.org/index.php/12567/multi-threaded-cache-stampede-in-core-cache?show=12570#a12570
Hello! How do I prevent exceptions in processor responses, as in
> {my-mutation {:com.wsscode.pathom3.connect.runner/mutation-error #error {
> :cause âMutation my-mutation not foundâ ..}}
? This is a problem b/c Transit screams when it tries to serialize an Exception.
I have https://github.com/fulcrologic/fulcro-rad/blob/ba17f5d3057a18e4af77294fc59b9408451896cd/src/main/com/fulcrologic/rad/pathom3.clj#L82-L93 ::pcr/wrap-mutate
that should catch an exception and return data instead but obviously it doesnât work. Thank you for any tips!
you are looking for ::pcr/wrap-mutation-error
humm, I'm looking close, maybe not, let me try something here
ok, your code is actually correct, but I found that the not found
is an edge case here
because that doesn't go though the wrap-mutate path
but it can, I got a fix, gonna make some tests and get it out
my example code:
(p.eql/process
(-> {:com.wsscode.pathom3.error/lenient-mode? true}
(pci/register
[(pco/mutation 'foo2
{}
(fn [env params]
(throw (ex-info "Foi" {}))))])
(p.plugin/register
{::p.plugin/id 'err
::pcr/wrap-mutate
(fn [mutate]
(fn [env params]
(try
(mutate env params)
(catch Throwable err
{::pcr/mutation-error (ex-message err)}))))}))
['(foo {})
'(foo2 {})])
; => {foo {:com.wsscode.pathom3.connect.runner/mutation-error "Mutation foo not found"},
; foo2 {:com.wsscode.pathom3.connect.runner/mutation-error "Foi"}}
fixed in main wait, not merged yet
That was a lightning fast fix, thank you!