Fork me on GitHub
#fulcro
<
2020-05-06
>
dvingo00:05:08

nice! what ended up being the issue? i just went through adding support for tick (date time lib) types, so i'm curious 🙂

murtaza5212:05:58

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

tony.kay13:05:47

datomic pro is on-prem…somehow you’re getting a call to the client API

tony.kay13:05:55

probably have a setting wrong in your config

murtaza5213:05:01

;; {: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.

murtaza5213:05:14

above is the config I am using.

tony.kay13:05:46

See the demo project. It uses on-prem. I’m talking about the EDN config file for Fulcro that you’re feeding into RAD.

murtaza5212:05:39

this error occurs on com.fulcrologic.rad.database-adapters.datomic-cloud/start-databases

murtaza5212:05:10

However if I use the datomic-cloud it works well, can someone help on this one ?

folcon12:05:56

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?

Eugen13:05:09

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?

cjmurphy13:05:02

That might be more of a Pathom thing - see #pathom channel.

Eugen13:05:02

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

tony.kay01:05:12

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.

Eugen05:05:05

Thanks, I will look into that

tony.kay14:05:52

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.

Eugen14:05:10

thanks. I agree it has advantages. I would like to know the downside to it - everything has at least one 🙂

tony.kay15:05:23

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.

Eugen15:05:04

guilty of that 🙂 thanks, I will keep that in mind

tony.kay15:05:08

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

tony.kay15:05:54

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.

tony.kay15:05:14

But, once you hit the right balance, things fall out quite nicely

tony.kay15:05:37

Then of course, some new thing pops into the world and throws a wrench at your beautiful thing

Eugen15:05:58

please stop describing my life 🙂

tony.kay15:05:07

So, constraining the problem domain is super important

Eugen15:05:21

yes, stop people from reinventing the internet

tony.kay15:05:26

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

Eugen15:05:47

like an ERP 😉 ?

Eugen15:05:31

because I'm looking at making an API on top of Apache OFBiz - which is ancient and ugly but has some ideas that I saw in pathom. Unfortunately Java has limitations on expressing that

Eugen15:05:15

thanks, if I get some results on that with Fulcro I'll be sure to publish them and share a link here