This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-02
Channels
- # beginners (130)
- # calva (3)
- # cider (13)
- # circleci (1)
- # cljsrn (19)
- # clojure (106)
- # clojure-europe (10)
- # clojure-losangeles (1)
- # clojure-nl (9)
- # clojure-uk (33)
- # clojurescript (16)
- # code-reviews (24)
- # conjure (11)
- # cursive (41)
- # data-science (9)
- # datomic (63)
- # fulcro (19)
- # graphql (12)
- # helix (4)
- # kaocha (2)
- # leiningen (3)
- # malli (8)
- # meander (1)
- # off-topic (17)
- # re-frame (16)
- # reitit (12)
- # sci (32)
- # shadow-cljs (73)
- # spacemacs (31)
- # sql (38)
- # tools-deps (26)
- # xtdb (28)
How is RAD Datomic handling enums internally? I have an enum and want to get the value, and happen to use d/fetch
, but that gives me back a {:db/id 17592186045420}
instead of the keyword I'd expect
How should I write the query when I have two different ui representations for the same entity in the same parent ui?
Let's say I have PersonDetail
and PersonProfile
under the same parent Account
. What should I put in :account/person
?
(defsc PersonDetail [..] {:ident :person/id ...} ...)
(defsc PersonProfile [..] {:ident :person/id ...} ...)
(defsc Account [_ {:account/keys [person]}]
{:ident :account/id
:query [:account/id {:account/person (comp/get-query ???)}]}
(div
(ui-person-detail person)
(ui-person-profile person)))
Thanks. I thought about having separate edges, but got stuck on how to easily load them in a nested query
Because now I have a discrepancy between the server-side schema and the client-side query structure. Feels like it's going to be something I have to constantly be conscious about.
But let me give it a try and see if it's going to be as much of a nuisance as I imagined
a person should just have resolvers…the server doesn’t care what the UI shape is. You probably want to “load” whichever screen you route to to make sure the data is up-to-date.
it’s exactly what RAD does: you could have a dozen different forms for a person. When you route to it, you load it.
I would not do it the way you’re doing it, because you’re re-inventing “routing”. I’d suggest playing with RAD and looking at how that all integrates togther rather that writing one-offs like this
Hi, my app started out as the template for 3 some time ago. Now I started using link queries [:some-data '_] as I understand them from the book. They work fine and like a charm. The Query shows up on the server though. Is this intended/normal behavior?