Fork me on GitHub
#clojurescript
<
2022-11-14
>
krapjost15:11:46

Hello community. I'm new to clojure world and i have been trying to use graphQL with clojure/clojurescript. but after some research i found a combination of datomic+datascript+datsync. which is enables synchronize server and local data automatically as my understanding. Since datascript is stored in client sides in-memory-DB, It seems like theres no needs for graphQL. So..Is my understanding right? Or is there some other good reason to use graphQL? Sorry for the novice question 😅

magnars15:11:38

Your understanding is right. Streaming datomic-esque facts to the client and storing them in datascript is a beautiful thing when it suits your problem. There might be some trade-offs wrt memory usage on the client and server, and the size of the payload to bootstrap the client-side database. But this is an architecture I would certainly choose when it fits.

krapjost16:11:04

Thank you for answering me. I'm trying to understand what you said. As examples for good fit use case for this structure, Dropbox or note taking apps are my first thoughts i could imagine. But if i want to build something like novel platform that depends on single database endpoint which has lots of clients looking into it. then it'll be not good fits. Because it simply can't sync the whole server and client data. Is that right? And in that case, is graphQL a good option? or is there some magical alternative option only exists in clojure world..? 😀

dvingo17:11:28

oh why yes, there is: https://pathom3.wsscode.com/docs/

💚 1
krapjost08:11:56

Thank you guys!

mping21:11:42

Is there a way to introspect on a cljs protocol? On clj, I can get eg: (:sigs proto)