This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-29
Channels
- # admin-announcements (1)
- # announcements (3)
- # babashka (18)
- # beginners (35)
- # cider (4)
- # clj-kondo (52)
- # cljs-dev (2)
- # clojure (92)
- # clojure-spec (18)
- # clojurescript (17)
- # conjure (11)
- # core-async (1)
- # datomic (11)
- # emacs (5)
- # fulcro (11)
- # graalvm (10)
- # helix (21)
- # kaocha (6)
- # malli (1)
- # membrane (37)
- # off-topic (110)
- # re-frame (1)
- # reagent (12)
- # reitit (5)
- # rewrite-clj (1)
- # sci (1)
- # shadow-cljs (40)
- # vim (21)
- # vrac (17)
how to access the database from the repl using fulcro-rad? I want to create some new queries but want to play with them manually so I can see what I would get. Do I need to use the datamic library directly or can I get access to the database from the environment outside a resolver or mutation?
are you branched off of the rad demo?
if you look at the demo, theres a ns com.example.components.datomic
that has a (defstate datomic-connections ...)
the development
ns uses that to seed the db -- should be able to do something similar in the REPL or something to get a connection to the db you're using
I'm really confused actually. I used datomic.api, connected to my local datomic free, and I have the fulcro-rad demo running, but I can't seem to query for any of the idents. :invoice/id :item/name, :customer/name everything I try to query says the entity cannot be resolved. I can click in the demo app and see these things in the app, but trying to query datomic for them I get entity errors.
(d/q '[:find ?e :where [?e :customer/name "Sam"]] (d/db conn))
Execution error (Exceptions$IllegalArgumentExceptionInfo) at datomic.error/arg (error.clj:79).
:db.error/not-an-entity Unable to resolve entity: :customer/name
There is something going on in the fulcro-rad-datomic adapter that I don't understand to translate pathom queries to datomic, and I am not good enough at clojure to understand exactly what is happening.