This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-07
Channels
- # adventofcode (114)
- # announcements (3)
- # aws (5)
- # babashka (62)
- # beginners (111)
- # calva (4)
- # cider (20)
- # clara (5)
- # clj-kondo (1)
- # cljs-dev (9)
- # clojure (255)
- # clojure-europe (75)
- # clojure-italy (10)
- # clojure-nl (3)
- # clojure-norway (5)
- # clojure-uk (6)
- # clojuredesign-podcast (5)
- # clojurescript (34)
- # community-development (28)
- # conjure (1)
- # cursive (3)
- # data-science (1)
- # datavis (1)
- # datomic (4)
- # figwheel-main (1)
- # fulcro (14)
- # graalvm (1)
- # graphql (8)
- # integrant (4)
- # introduce-yourself (2)
- # jobs (2)
- # juxt (4)
- # kaocha (2)
- # malli (6)
- # membrane-term (53)
- # mount (2)
- # nextjournal (2)
- # off-topic (27)
- # pathom (11)
- # polylith (3)
- # portal (11)
- # reagent (4)
- # reitit (4)
- # remote-jobs (1)
- # reveal (14)
- # shadow-cljs (22)
- # tools-deps (24)
- # vim (6)
- # xtdb (19)
Is it possible to make a query like [{:some/entity [*]}]
i.e. one that would fetch all attributes of an entity? Fulcro supports '*
but Pathom does not, right? I.e. I must list the attributes I want?
https://pathom3.wsscode.com/docs/eql#wildcard like it should be possible?
I forgot to mention I have P2, though an answer for P3 is also interesting
its important to understand what *
means for Pathom, and that is "give me all the data you loaded so far", which is different from "all possible data for this entity"
so, for instance, a query like: [{[:ident/id 123] [*]}]
will always return just {:ident/id 123}
, because no resolver is triggered in this procress
but something like [{[:customer/id 123] [:customer/name *]}]
might return a map with many attributes, if this system has some customer-by-id
resolver that returns 8 customer properties, all those 8 would get out as a consequence of *
for a time there was a consideration to have another special one, like **
, to get everything, but that never moved forward, and Im not convinced its a good idea at this moment, because the way Pathom works, its likely that in a lot of cases this might never finishes processing due to the amount of possibilities there
Thank you! I am not trying to express a need for it, I was just curious. Thank you!
Interesting, it makes sense to support such a thing for something like a details page of a post.
@U02PHJ3C1QV that only works up to some point, for instance, a system will tend to expand, and even a blog post may have data you don't wanna fetch (like internal metrics), due to this is better to think about always expressing exactly what you need, and update the query in case you need to display more things, this will keep things predictable, otherwise you may accidentaly start fetching tons of unnecessary data
@U066U8JQJ oh that makes prefect sense. Thank you