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?
my inclination is that would break and/or be a terrible idea, but not positive on that
@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 π
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, ...)
appreciate the response and insight!
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 triedI 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?
yes, use the connector
when you open the app, it has links for how to setup the connector
both for pathom 2 and 3
you have this data in the meta
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?
I haven't played with viz yet. Looks like I have a good reason now )
π
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
tip: click on the bars on the trace view to open the graph view