This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-06
Channels
- # announcements (5)
- # aws (28)
- # babashka (4)
- # beginners (163)
- # bristol-clojurians (2)
- # calva (4)
- # cider (18)
- # clj-kondo (30)
- # cljs-dev (28)
- # cljsrn (50)
- # clojure (96)
- # clojure-europe (25)
- # clojure-italy (6)
- # clojure-losangeles (1)
- # clojure-nl (4)
- # clojure-sweden (7)
- # clojure-uk (32)
- # clojurescript (39)
- # conjure (74)
- # cursive (12)
- # events (1)
- # fulcro (32)
- # helix (71)
- # jackdaw (2)
- # leiningen (10)
- # off-topic (14)
- # pathom (59)
- # rdf (7)
- # re-frame (6)
- # reitit (28)
- # ring (7)
- # shadow-cljs (207)
- # slack-help (2)
- # spacemacs (3)
- # specter (7)
- # sql (12)
- # tools-deps (14)
- # xtdb (32)
nice! what ended up being the issue? i just went through adding support for tick (date time lib) types, so i'm curious š
I am trying to use datomic-pro with fulcro-rad, and I am getting the error below -
datomic.client.impl.shared.Client.create_database(Ljava/lang/Object;)Ljava/lang/Object;
async.clj: 148 datomic.client.api.async/create-database
;; {:server-type :peer-server ;; :access-key "myaccesskey" ;; :secret "mysecret" ;; :endpoint "localhost:8998" ;; :validate-hostnames false ;; :db-name "dev-db"} Its an in memory db I am using for dev. I am able to connect directly to it , and do transactions, however through fulcro it fails.
See the demo project. It uses on-prem. Iām talking about the EDN config file for Fulcro that youāre feeding into RAD.
this error occurs on com.fulcrologic.rad.database-adapters.datomic-cloud/start-databases
It might be worthwhile dropping into either the datomic slack or the forums? Just to establish itās not a datomic specific connection issue as opposed to a fulcro one?
hi, does Fulcro as something for generating API documentation for developers ? In graphql - because it's defined as a language, there are some tools that generate it based on comments: https://github.com/2fd/graphdoc . I imagine this can be done from the elements in clojure. Did anyone do something like this or has some ideas on to do it?
To add more context to the above question: I'm asking how to generate API docs that external developers would use to integrate or develop on top of a Fulcro app
Pathom resolvers are just mapsā¦they are open maps. Put keys in them. Doc generation is then just an iteration over the resolvers (maps) extracting necessary info. Linkage can be figured out using pathom indexes, which are documented in Pathom book.
BTW, the RAD approach of putting the definitions in attributes and deriving everything from that is, IMO, more generalā¦define your data model, then generate everything from there (schema, resolvers, network APIs (EQL and GraphQL and REST), database saves, etc.). An example of the great power you get out of these concentrations of metadata are things like: general save for normalized and properly namespaced Fulcro data makes the general algorithm for āsaveā very tractable for any database (for Datomic its like 200 lines of codeā¦writing to your database for all operations (sans security): done). But then security and every other concern can usually also be described on the model. Itās quite a powerful way to build a system.
thanks. I agree it has advantages. I would like to know the downside to it - everything has at least one š
The biggest downside is that there is a tendency to over-generalize, which is typically the downfall of any system that is trying to be broad.
so for example, take to-many relations. If I try to over-generalize so that I can capture enough data to model the thing in Datomic and SQL and Firebase and ā¦. all at once, then the generalization itself becomes crazy
the trick is to be very very careful of capturing a distilled detail that is neither overly general or too specific. Itās a very hard problem, actually.
Then of course, some new thing pops into the world and throws a wrench at your beautiful thing
RAD is aimed at common business apps that have form-like and report-like thingsā¦try to build an MMORPG with it, and itāll beā¦interesting