This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-04
Channels
- # announcements (5)
- # beginners (205)
- # calva (1)
- # cider (48)
- # cljs-dev (9)
- # clojure (123)
- # clojure-berlin (1)
- # clojure-europe (2)
- # clojure-italy (5)
- # clojure-nl (6)
- # clojure-russia (7)
- # clojure-serbia (1)
- # clojure-spec (8)
- # clojure-uk (33)
- # clojurescript (134)
- # cursive (5)
- # datomic (31)
- # emacs (5)
- # figwheel-main (61)
- # fulcro (10)
- # hyperfiddle (23)
- # jobs-discuss (24)
- # klipse (1)
- # lein-figwheel (3)
- # midje (5)
- # nyc (1)
- # parinfer (2)
- # pathom (14)
- # pedestal (12)
- # re-frame (46)
- # shadow-cljs (24)
- # spacemacs (1)
- # tools-deps (37)
- # vim (4)
- # yada (22)
I suppose a comment about why/when you would need to set ::pc/sym. I'm wondering if there is a way to define a resolver in a different namespace than the parser. Putting other-namespace/my-mutation in the app-registry didn't seem to work. Maybe I should try :refer 'ing it into that parser's namespace instead.
@pauld the result from defresolver
/ defmutation
is a map, so in the end you have a var containing a map, what really matters at invocation time for mutations is the ::pc/sym
, on mutations you always want to set unless you want to use the mutation fully qualified name (full definition namespace + name, that's the default setting if you don't provide one), makes sense?
yes, I think so - and the only time you don't want to use the default fully qualified name from the defmutation namespace is if you the fulcro-http-remote is looking up that defmutation via a different namespace than where the ultimate defmutation is defined and put into the registry.
Hmm... still can't get a defmutation that is defined in another namespace to work. It's not critical, but this could cause people trouble because the fulcro book suggests separating mutations from reads and using Pathom will make them run into the same issue I had and my workaround is not the most obvious approach.
I'm either doing this wrong or we need to advise people to make sure they keep their mutations (and resolvers?) definined in the same namespace as the parser. And the workaround is to def the mutation in another namespace (ie mutations.clj) if you want to use it with the fulcro-http-remote that uses mutations.clj and mutations.cljs namespaces for the api calls.
@pauld can you send some sample code of the key points you are using? like the definition of the mutation, registry and call for it
thanks for the repo, I'll take a look later today