This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-06
Channels
- # aleph (1)
- # beginners (180)
- # calva (16)
- # cider (29)
- # clj-kondo (47)
- # cljsrn (5)
- # clojure (40)
- # clojure-dev (39)
- # clojure-europe (1)
- # clojure-italy (25)
- # clojure-nl (9)
- # clojure-russia (1)
- # clojure-spec (8)
- # clojure-uk (83)
- # clojurescript (54)
- # core-async (2)
- # datomic (20)
- # defnpodcast (7)
- # figwheel (6)
- # fulcro (6)
- # jobs (5)
- # joker (4)
- # kaocha (4)
- # luminus (4)
- # off-topic (8)
- # onyx (6)
- # pathom (14)
- # re-frame (28)
- # reagent (30)
- # remote-jobs (2)
- # shadow-cljs (88)
- # spacemacs (2)
- # specter (17)
- # sql (25)
- # tools-deps (78)
- # xtdb (1)
- # yada (2)
Using: fulcrologic/fulcro {:mvn/version "2.8.12"}
Error: [2676.435s] [fulcro.client.impl.application] INTERNAL ERROR: split-mutations was asked to split a tx that contained things other than mutations.
- despite the error, the application works
It occurs when I return a query without a mutation from a mutation
(fm/defmutation goto-page-42
[_]
(action [{:keys [state]}] (swap! ...))
(remote [{:keys [ast state]}]
(-> (fp/get-query Page42)
(eql/focus-subquery [:>/page-data])
(eql/query->ast1)
;; will result in something like
;; [{:app.user/me (fp/get-query Page42)}]
(assoc :dispatch-key :app.user/me
:key :app.user/me))))
Questions:
1- Is wrong return a "query" from a mutation?
2- in fulcro3 it will be suported?
3- should I have a "dummy" mutation on server to handle this?@souenzzo are you triggering a mutation but using a property key when sending to the server?
any reason for not using a load
instead?
When I call goto-page-42
i need to
- swap! client state to this page
- load data from server
df/load can't do that.
@souenzzo You answers are:
1. In fulcro 2, it is wrong to return a query from a mutation. Use load-action instead.
2. Yes, Fulcro 3 is completely open on this front, though I think I still have a limitation that a mutation cannot return an AST of multiple mutations for a remote (can’t change one mutation into many at the mutation level, at least)
3. You could, but load-action
is better.