pathom

:pathom: https://github.com/wilkerlucio/pathom/ & https://pathom3.wsscode.com & https://roamresearch.com/#/app/wsscode
souenzzo 2020-07-22T14:04:41.341500Z

Also @tvaughan as a frontend/fulcro dev, it's useful to have :document/status {:db/ident :document.status/draft} because it opens space to things like :db/ident :document... ::label "A draft" ::description "You can't sent it"

1
souenzzo 2020-07-22T14:11:10.341700Z

PS: You can save in datomic

:db/ident :document.status/draft
:app.enum/description "abc"
:app.enum/label            "abc"
PSPS: No IDK how to do i18n 😞

tvaughan 2020-07-22T14:52:33.341900Z

Sorry @souenzzo, I don't follow. I understand how these things work in the Datomic pull-syntax world, but it seems this part at least isn't compatible with EQL/Pathom. What is this meant to show? Sorry, I'm not being cute. I don't understand this

souenzzo 2020-07-22T14:57:17.342100Z

What I'm saying is that in practice, ask for [{:document/status [:db/ident]}] is a good thing It's wired at first look, but once you get into a #fulcro app, you will see that it opens space to request "metadata" about your enum, like it's label

souenzzo 2020-07-22T14:58:39.342300Z

In my PS, i tryied to show that datomic allow you to store metadata in the same entity that you store your enum

tvaughan 2020-07-22T15:00:31.342500Z

Gotcha. That's an interesting approach. Thanks!

souenzzo 2020-07-22T15:02:42.342700Z

Also: https://github.com/souenzzo/eql-style-guide/issues/5

👍 1
jackson 2020-07-22T20:44:35.346300Z

When using pathom with datomic, what’s the recommended way to add a db to the environment for resolvers? I’m currently using the env-wrap-plugin to add the connection to the environment, but I’d like for each resolver to use the same db. Of course I could add the db rather than the connection in env-wrap-plugin, but is there somewhere else to add the connection just once rather than connecting every time? I’ve tried adding keys to the parser ::p/env but that doesn’t seem to be what’s passed to env-wrap-plugin.

jackson 2020-07-22T20:49:52.346400Z

I suppose I could just create the connection elsewhere in my ns and just add it with the env-wrap-plugin for use with mutations.