This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-21
Channels
- # aws (14)
- # babashka (35)
- # beginners (163)
- # boot (2)
- # calva (5)
- # cider (30)
- # clojure (143)
- # clojure-colombia (1)
- # clojure-europe (5)
- # clojure-nl (11)
- # clojure-spec (1)
- # clojure-uk (16)
- # clojurescript (71)
- # community-development (2)
- # conjure (1)
- # cursive (6)
- # datomic (30)
- # duct (4)
- # figwheel-main (11)
- # fulcro (28)
- # graalvm (3)
- # graphql (23)
- # hoplon (36)
- # jackdaw (24)
- # kaocha (16)
- # lambdaisland (1)
- # leiningen (4)
- # luminus (3)
- # meander (4)
- # observability (1)
- # off-topic (10)
- # pathom (5)
- # re-frame (27)
- # reitit (7)
- # remote-jobs (1)
- # sci (17)
- # shadow-cljs (22)
- # spacemacs (14)
- # sql (61)
- # testing (3)
- # tools-deps (27)
- # vim (2)
- # xtdb (18)
- # yada (2)
What's the canonical way to query for enums in EQL/Pathom? If I have a schema like:
{:db/ident :document/status
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one}
{:db/ident :document.status/draft}
{:db/ident :document.status/final}
A query for [:document/status]
returns :document/status {:db/id 17592186045468}
. I know that with Pathom it's recommend to have separate id's for entities, like :document/id
, :person/id
, etc. which I do have elsewhere. But entities like these aren't enumerated entities. If there's an EQL compatible way to query for the keyword, I haven't found it. Any help is appreciated. Thanksthis isn’t really a ‘pure’ pathom thing per-se. Just has to do with the fact that while EQL/Pathom are very close, there isn’t always 1-to-1 correspondence with Datomic. so you can either roll your own resolvers for your enum attrs that return the :db/ident value, or check out pathom-datomic that has some special sauce to make this easier. basically you give it your enum attributes at config time, and it does what I described for you
Right, I knew I was conflating the two. Sorry for any confusion. Thanks @eoliphant. I'll check-out pathom-datomic