pathom

:pathom: https://github.com/wilkerlucio/pathom/ & https://pathom3.wsscode.com & https://roamresearch.com/#/app/wsscode
2021-02-10T02:15:18.215300Z

when working with datomic + pathom, is it insane to have multiple entities each have a :`db/id` key, especially considering the case where that :db/id might be the input to other resolvers?

2021-02-10T02:15:34.215700Z

my inclination is that would break and/or be a terrible idea, but not positive on that

souenzzo 2021-02-10T03:01:25.217600Z

@mss in pathom2 with pc/reader2, if you use :db/id in every resolver, you may experience some performance issues IDK the current status for pathom3 Anyway, I use pathom2 with datomic, and manually extract each pull from my system. Not a big deal πŸ™‚

πŸ‘ 2
BjΓΆrn Ebbinghaus 2021-02-10T15:55:07.218100Z

I think the best solution is not to use :db/id as a key for your API. :db/id identifies an entity in your DB. You can use a key :user/id or :watever-model/id for public use which is another name for :db/id. Or you don't use the db/id at all and generate some other form of public id. (UUID, slugs, ...)

2021-02-10T03:03:24.217800Z

appreciate the response and insight!

markaddleman 2021-02-10T20:02:05.222800Z

Processing an EQL query with Pathom3, I get the following error info:

:type clojure.lang.ExceptionInfo
               :message "Insufficient data"
               :data {:required #:data-source{:id {}}, :available {}}
               :at [com.wsscode.pathom3.connect.runner$invoke_resolver_from_node$fn__45209 invoke "runner.cljc" 399]}
It would be helpful if the ex-info data included the name of the resolver(s?) that pathom tried

markaddleman 2021-02-11T18:02:52.227Z

I don't have an EQL endpoint for my app. Is there a way to write up Viz as part of my REPL so it can submit EQL as a function call?

wilkerlucio 2021-02-11T18:52:58.227400Z

yes, use the connector

wilkerlucio 2021-02-11T18:53:10.228Z

when you open the app, it has links for how to setup the connector

wilkerlucio 2021-02-11T18:53:15.228300Z

both for pathom 2 and 3

wilkerlucio 2021-02-11T18:53:46.228600Z

https://github.com/wilkerlucio/pathom-viz-connector

πŸ™ 1
wilkerlucio 2021-02-10T20:10:21.223100Z

you have this data in the meta

wilkerlucio 2021-02-10T20:10:58.224500Z

there are ways to crunch it from there, or using pathom viz you can see the graph and analyse the parts, have you tried that?

markaddleman 2021-02-10T22:39:42.224800Z

I haven't played with viz yet. Looks like I have a good reason now )

markaddleman 2021-02-10T22:39:42.225Z

πŸ™‚

wilkerlucio 2021-02-10T22:54:13.225200Z

give it a go, connect your parsers and track whats going on in the Requests tab, let me know if have any hiccups in the process

wilkerlucio 2021-02-10T23:16:06.225400Z

tip: click on the bars on the trace view to open the graph view