This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-18
Channels
- # adventofcode (62)
- # aws (5)
- # beginners (59)
- # calva (63)
- # cider (26)
- # cljdoc (1)
- # cljsrn (22)
- # clojure (99)
- # clojure-austin (1)
- # clojure-dev (19)
- # clojure-europe (4)
- # clojure-hamburg (2)
- # clojure-italy (3)
- # clojure-nl (23)
- # clojure-spec (2)
- # clojure-uk (85)
- # clojurescript (41)
- # core-async (17)
- # cursive (20)
- # data-science (11)
- # datascript (2)
- # datomic (31)
- # emacs (7)
- # figwheel (28)
- # figwheel-main (12)
- # graphql (2)
- # hyperfiddle (3)
- # juxt (1)
- # kaocha (2)
- # leiningen (5)
- # nrepl (13)
- # off-topic (45)
- # pathom (13)
- # pedestal (11)
- # re-frame (20)
- # reagent (10)
- # shadow-cljs (92)
- # spacemacs (9)
- # sql (39)
- # tools-deps (32)
- # unrepl (3)
@wilkerlucio I have some trouble with the pathom remote for Fulcro. I alway get {:message "Mutation not found", :data {:mutation login}}
when I make a mutation like so: [(login {...params...}})]
I have used the template setup from the developers guide. What am I doing wrong here? I am getting crazy.
(pc/defmutation login [env {:keys [connection nickname password]}]
{::pc/sym 'login
....})
(def my-app-registry [login])
(def parser
(p/parallel-parser
{::p/env {...}
::p/mutate pc/mutate-async
::p/plugin [(pc/connect-plugin {::pc/register my-app-registry})
...]}))
@mroerni the issue here I think is because you used a simple symbol to define your mutation, that means it has the fully qualified name whatever-ns-you-have/login
instead of just login
, I suggest you try namespacing it on the server (maybe user/login
), of you use that on the definition then you can use directly
Already did that. Same result. ::pc/sym 'dbas/login
Is there a way to get all registered mutations?
you can check on the index, there is ::index-mutations
there that should have then all
I just realized there is no good full example of it, I'm writing one now so I can double check if its all good on that flow and provide an example
I am just starting with pathom. I don't fully understand where I get access to the index, yet.
to access it you need to provide your own, you can use (def index (atom {}))
at some place, then provide to connect-plugin
as ::pc/indexes index
when the parser starts it will be mutated with the injected values
Oh... Simple mistake.. It is: ::p/plugins
not ::p/plugin
😓
the famous typos 🙂
Maybe I should write a spec ...
here is the full simple demo so you can check other things as well 😉 https://github.com/wilkerlucio/pathom/blob/master/workspaces/src/com/wsscode/pathom/workspaces/connect/simple_demo.cljs
Thank you. 🙂 My code is finally working like intended. After I gave up on my own remote, I realised that PathomRemote is already doing, what I intended to do.