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"
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 😞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
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
In my PS, i tryied to show that datomic allow you to store metadata in the same entity that you store your enum
Gotcha. That's an interesting approach. Thanks!
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
.
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.