Fork me on GitHub

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])
                            ;; 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.


I usually use a "empty mutation" on server But this solution looks cleaner


@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.

✔️ 4