This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-28
Channels
- # announcements (11)
- # aws (30)
- # beginners (98)
- # calva (11)
- # cider (42)
- # clj-kondo (4)
- # cljdoc (1)
- # cljsrn (5)
- # clojure (132)
- # clojure-europe (4)
- # clojure-ireland (1)
- # clojure-italy (35)
- # clojure-japan (2)
- # clojure-nl (5)
- # clojure-spec (5)
- # clojure-uk (24)
- # clojurescript (71)
- # clojutre (1)
- # core-async (6)
- # cursive (9)
- # data-science (4)
- # datascript (3)
- # datomic (78)
- # duct (16)
- # emacs (14)
- # events (2)
- # fulcro (141)
- # graalvm (5)
- # hoplon (14)
- # hyperfiddle (2)
- # jobs-discuss (14)
- # joker (8)
- # luminus (2)
- # off-topic (7)
- # om (1)
- # pathom (4)
- # pedestal (7)
- # planck (2)
- # quil (1)
- # re-frame (14)
- # reagent (2)
- # reitit (14)
- # robots (1)
- # shadow-cljs (20)
- # spacemacs (25)
- # specter (1)
- # sql (122)
- # tools-deps (63)
- # unrepl (2)
- # yada (34)
I have a basic pathom 101 question that has me puzzled. Let's say I have an entity called 'thing' and I want to query for attributes of thing like thing/name and thing/age .. and usually pathom lets you pass in the query and that works fine BUT if the attributes are not in the pc/output then the query params are not used, so it seems like I have to list all the thing attributes in the pc/output value ?? is that true ? am I missing something .. so here is my resolver
(defresolver thing-resolver
"Resolves query for a thing"
[{:keys [conn] :as env} {:keys [thing/id] :as input}]
{::pc/input #{:thing/id}
::pc/output [:db/id :thing/id]}
(d/pull (d/db conn) (::core/parent-query env) [:thing/id id]))
and if I query for thing/name and or thing/age they will not be returned since they are not declared in the ::pc/output
this seems odd, but maybe that is the way it is ?