What's the canonical way to query for enums in EQL/Pathom? If I have a schema like:
{:db/ident :document/status
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one}
{:db/ident :document.status/draft}
{:db/ident :document.status/final}
A query for [:document/status]
returns :document/status {:db/id 17592186045468}
. I know that with Pathom it's recommend to have separate id's for entities, like :document/id
, :person/id
, etc. which I do have elsewhere. But entities like these aren't enumerated entities. If there's an EQL compatible way to query for the keyword, I haven't found it. Any help is appreciated. Thanksthis isn’t really a ‘pure’ pathom thing per-se. Just has to do with the fact that while EQL/Pathom are very close, there isn’t always 1-to-1 correspondence with Datomic. so you can either roll your own resolvers for your enum attrs that return the :db/ident value, or check out pathom-datomic that has some special sauce to make this easier. basically you give it your enum attributes at config time, and it does what I described for you
Right, I knew I was conflating the two. Sorry for any confusion. Thanks @eoliphant. I'll check-out pathom-datomic
ah no, not at all. if you can use Datomic in your app, it with Pathom is a match made in heaven lol. Just little stuff like that you have to be aware of. And things just got a bit better with some of the new datomic apis that were just released. qseq and index-pull
Cool. Thanks again!