This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-31
Channels
- # announcements (4)
- # aws-lambda (1)
- # babashka (25)
- # beginners (60)
- # calva (33)
- # cider (15)
- # cljdoc (1)
- # clojure (28)
- # clojure-dev (1)
- # clojure-europe (4)
- # clojurescript (29)
- # clojureverse-ops (4)
- # conjure (10)
- # datomic (4)
- # graalvm (4)
- # holy-lambda (4)
- # honeysql (13)
- # introduce-yourself (1)
- # lambdaisland (1)
- # missionary (11)
- # music (2)
- # off-topic (35)
- # pathom (17)
- # pedestal (20)
- # reagent (3)
- # sci (10)
- # shadow-cljs (39)
- # sql (6)
- # tools-deps (6)
- # vim (1)
when writing pathom resolvers for datomic, is it better to key on the primary key (e.g. uuid
) or the internal db/id
? what if the entity has a composite primary key, is it ok to key off that?
I'm curious what others have to say. In my experience, I prefer not to expose internal IDs so I would avoid the datomic I'd and use the generated uuid
Composite keys are interesting. You can certainly model them using Pathom. There is some question around how to expose that data in external facing Pathom API
See https://github.com/wilkerlucio/pathom3/discussions/77#discussioncomment-1048391
+1 for domain/biz/etc id’s instead of :db/id. Pathom and Datomic are a match made in heaven, EQL all the way down (more or less), but :db/id’s have always felt a little leaky to me
Is there a way to ask pathom to give me "everything" that can be reached via joins on a certain entity? E.g, if I have an entity type a
with :a/b
as a join, and b
with b/c
as a join, I'd want results like {[:a/id ...] {:a/id ... :a/b {:b/id ... :b/c {...}}}}
given a query like [{[:a/id ...] ???}]
. I feel silly asking, since I know pathom's all about specific queries yielding specific data, but I'm feeling lazy
I know the *
special query symbol is available for a particular entity, i guess i'm looking for a recursive version of that
yeah... the problem here is that I have joins of unknown depth/type. No biggie, I should just write some code 🙂
no feature for that yet, in Pathom 3, a good way to explore data you don't know is using smart maps + datafy
if you do this combo, you can use tools like Portal, Reveal or REBL to navigate the structure
is your usage for exploration or to make something prod-like?
prod-like: there's a tree I want to emit that has an unknown (user-created) structure. I think I wanted this facility to help me tinker with stuff in the REPL while I'm developing without writing a giant EQL query, but for actual prod code I don't think this is something I need, and for dev I can just write a function in my dev ns to help with the query
@wilkerlucio is https://github.com/wilkerlucio/log meant for public use? going to polish up and release my pathom-based depenedncy injection framework, think it's pretty good at this point and was wondering if I can make use of this
hello, feel free to use, I'm not decided if I'm going to continue or not this library, but so far I see no other option for map-driven logs that works on both CLJ and CLJS, would love to use mulog, but it doesn't work in CLJS