This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-23
Channels
- # announcements (5)
- # beginners (14)
- # bigdata (1)
- # calva (13)
- # cider (10)
- # clj-kondo (53)
- # cljs-dev (1)
- # cljsrn (12)
- # clojure (67)
- # clojure-uk (8)
- # clojuredesign-podcast (3)
- # clojurescript (53)
- # duct (4)
- # emacs (1)
- # events (1)
- # figwheel-main (5)
- # fulcro (9)
- # graalvm (68)
- # graphql (3)
- # joker (3)
- # juxt (4)
- # off-topic (32)
- # other-languages (1)
- # pathom (35)
- # re-frame (6)
- # rum (1)
- # shadow-cljs (52)
- # spacemacs (3)
- # sql (10)
- # tools-deps (15)
Hi, I want to know you guys' tech stack in clojure/script for a fullstack development(using pathom). 😈
most of the times I write the servers from scratch, just pulling pathom, or depending on the kind of app, make it 100% client (Pathom can run there as well, in this model the client parser will process things and delegate to apis using the resolvers, using the async parser)
@U0NBGRGD6 I am writing a template-based framework similar to VueJS where you can use fragments of EQL queries in place of data. It uses Pathom under the hood.
@U8MJBRSR5 great! show me please!
I did not release its source code yet .. the poc was too primitive. I hope to have a first draft ready by the end of december.
Something like Fulcro, but replace the render function with a template.
by template I mean a declarative form .. a data.
Here is how it may look like:
(def todo-item
{:id ::todo-item
:name "Todo Item"
:description "A todo item for the todo list."
:props [^:eql 'item
'color]
:template `[:li
(when color {:style {:color color}})
(:todo-item/description item)
(when (:todo-item/done? item)
" (done)")]})
(def todo-list
{:id ::todo-list
:name "Todo List"
:description "A todo list."
:props [^:eql 'list]
:env {'colors ["limeGreen" "chartreuse" "forestGreen"]
'cycled-color (fn [colors index]
(get colors (mod index (count colors))))}
:template `[:div
[:h1 "Things to do"]
[:div (:todo-list/title list)]
(let [items (:todo-list/items list)]
(if (empty? items) ; also can use if-not
[:div "No items in this list"]
[:ul
(for-indexed [[index item] items]
(let [item-color (cycled-color colors index)]
^{:class :item} [::todo-item item item-color]))]))]})
(def my-components [todo-item todo-list])
That syntax will change, but that’s the idea
interesting! how you build the whole eql from root? I mean joined query, like [:x/a :a/b {:x/y [:y/c :y/d]}]
.
.. just follow the data usage.
me too, and now I am implementing it.
the template is made of a DSL, not general Clojure functions.
I will talk more about it once I release the first draft.
The name is Vrac.
I want to try a new stack (for me) which use eql and get the query from UI, resolve the query from database. So is fulcro/pathom/walkable a good choice?
hello man, sorry the delay, still doing the trip back home :)
so, about walkable, one issue is that currently it doesnt integrate with connect (walkable was developed before that), so if you pull walkable you cant use the attribute connection thing on top of that
so, I suggest you can go without walkable, you can still implement the resolvers and run SQL queries (or anything else) in their body, not so automatic, but over time you really don't want to expose the whole SQL to the client
makes sense?
If you don’t want to write the CRUD SQL yourself, I’ve looked into using https://hasura.io/ to get GraphQL CRUD over Postgres, and then using Pathom Connect’s GraphQL support to interact with the GraphQL API generated by Hasura
If you aren’t using Postgres, something similar may be possible with https://www.prisma.io/ (I am not sure, Prisma keeps pivoting their offerings…)
Here's a demo app using fulcro, pathom, and hasura: https://github.com/codonnell/crudless-todomvc
Thanks @U0DUNNKT2!
Sure thing 🙂
Crux seems promising too https://opencrux.com/
If you don’t want to write the CRUD SQL yourself, I’ve looked into using https://hasura.io/ to get GraphQL CRUD over Postgres, and then using Pathom Connect’s GraphQL support to interact with the GraphQL API generated by Hasura