This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-01
Channels
- # announcements (10)
- # aws (1)
- # babashka (19)
- # beginners (104)
- # calva (50)
- # cider (17)
- # cljs-dev (135)
- # cljsrn (56)
- # clojure (240)
- # clojure-dev (4)
- # clojure-europe (19)
- # clojure-nl (2)
- # clojure-uk (7)
- # clojurescript (22)
- # conjure (2)
- # css (1)
- # cursive (10)
- # data-science (1)
- # datomic (60)
- # emacs (2)
- # events (2)
- # exercism (1)
- # figwheel-main (3)
- # fulcro (13)
- # graalvm (5)
- # gratitude (1)
- # inf-clojure (4)
- # introduce-yourself (5)
- # jobs-discuss (21)
- # lsp (36)
- # malli (6)
- # meander (8)
- # missionary (12)
- # off-topic (14)
- # pathom (13)
- # pedestal (10)
- # polylith (42)
- # re-frame (5)
- # reagent (12)
- # reitit (3)
- # releases (8)
- # sci (10)
- # shadow-cljs (37)
- # sql (5)
- # tools-deps (6)
If I have two components, ItemList
and Item
, and my ItemResolver
includes an :item/item-list
key, that key's value should be a map like :item/item-list {:item-list/id :special-list}
rather than a flat value like :item/item-list :special-list
, right? I think that using a map will allow Pathom to make a connection between :item/item-list
while using a flat value will not.
right, you need to have the value paired with :item/item-list
be a map in order for Pathom to understand it as an entity that it can use other resolvers to expand
so the normal way to resolve a route-deferred
is to include {:post-mutation
dr/target-ready ...}` in the options map of a load!
--is it also OK to to just transact that mutation (`(comp/transact! app [(dr/target-ready {...})])`) right after the load? I think the load is required to finish before the processing of the next transaction is allowed to proceed, right?
I don't think Fulcro waits on remote calls. load! is essentially a mutation and only mutstion's actions are evaluated in order. The remote sections are started in order but the response will be handles when it arrives, tx processing doesn't wait for it
I see, thanks--based on my scenario, it looks like grouping all my mutations into a single tx and then using a pessimistic transaction (https://book.fulcrologic.com/#PTransact) might be the move
The df/load!
docs mention:
> - server-property-or-ident
: A keyword or ident that represents the root of the query to send to the server. If this is an ident you are loading a specific entity from the database into a local app db table. A custom target will be ignored.
But example 3 here https://fulcro-community.github.io/guides/tutorial-minimalist-fulcro/#_loading_remote_data uses an ident (`[:employee/id 123]`) and includes a :target
in the config. Isn't that an example of custom targeting, which, according to the docs snippet above, should be ignored?
docstring is wrong. Pretty sure load
will put the ident (via targeting) wherever you target it.
Perhaps the docstring is just unclear? Even in my example the data still ends up in the db under the ident, targeting only adds a "pointer" to that data to another part of the DB. Perhaps the docstring meant that it is not possible to relocate the data to elsewhere? (though it in fact may be possible nowadays?)
FYI both minimalist-fulcro-template-backendless and fulcro-exercises have been modified to invoke shadow via npx and to work with Calva's Jack-in (see the respective READMEs). (Calva does not like it when you start shadow manually via clojure -M:...
as it wants to set its own main options.)