This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-03
Channels
- # beginners (167)
- # boot (22)
- # chestnut (3)
- # cider (9)
- # clojure (107)
- # clojure-berlin (1)
- # clojure-greece (3)
- # clojure-italy (6)
- # clojure-losangeles (6)
- # clojure-russia (8)
- # clojure-spec (71)
- # clojure-uk (42)
- # clojurescript (186)
- # community-development (1)
- # core-async (12)
- # core-typed (1)
- # css (15)
- # cursive (29)
- # data-science (11)
- # datomic (8)
- # defnpodcast (28)
- # duct (2)
- # fulcro (169)
- # graphql (6)
- # hoplon (3)
- # jobs-discuss (1)
- # kekkonen (5)
- # leiningen (11)
- # lumo (7)
- # off-topic (14)
- # om (1)
- # other-languages (14)
- # portkey (7)
- # re-frame (27)
- # reagent (14)
- # remote-jobs (1)
- # ring-swagger (5)
- # rum (15)
- # shadow-cljs (52)
- # spacemacs (59)
- # specter (78)
- # test-check (3)
- # vim (9)
- # yada (23)
Hey guys … I am trying to do remote mutations with om.next … I am able to send the mutation to the backend with
(defmethod mutatef 'upsert-user
[{:keys [state ast]} key param]
{:value {:keys [:app/current-user]}
:remote true
:auth-query ast})
the server side parser also returns
{:value {:keys [:app/current-user]}}
And my reconciler/send
function
(POST "/auth-query"
{:params {:query query}
:handler (fn [response] (cb (rewrite response)))
:error-handler error-handler})
The problem is that, lets say the server takes 5seconds to process the mutation, how does the cb
function know that it should re-read the keys returned in {upsert-user {:keys [:app/current-user]}}
from the server ?
Right now, it seems to re-read immediately the mutation is triggered eventhough it is a remote mutation, and does not re-read the keys the server responds with