This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-10
Channels
- # beginners (15)
- # boot (15)
- # cider (6)
- # cljs-dev (231)
- # cljsjs (1)
- # cljsrn (26)
- # clojure (147)
- # clojure-argentina (1)
- # clojure-dev (8)
- # clojure-germany (1)
- # clojure-italy (26)
- # clojure-russia (2)
- # clojure-spec (83)
- # clojure-uk (154)
- # clojurescript (123)
- # conf-proposals (3)
- # core-async (5)
- # cursive (26)
- # datascript (21)
- # datomic (120)
- # emacs (2)
- # graphql (9)
- # hoplon (195)
- # instaparse (16)
- # jobs-discuss (1)
- # leiningen (8)
- # luminus (8)
- # lumo (7)
- # off-topic (17)
- # om (7)
- # om-next (3)
- # parinfer (121)
- # pedestal (5)
- # planck (13)
- # re-frame (11)
- # reagent (21)
- # ring-swagger (2)
- # spacemacs (28)
- # uncomplicate (3)
- # unrepl (7)
- # untangled (34)
- # vim (5)
I'm just curious... anyone here have experience making Datascript work with Graphql? Or does the combination make sense?
in Datomic: https://github.com/danscan/datomic-graphql similar in Datomic: http://docs.caudate.me/adi/ To me, * I don't see the point of using graphql client-side/in-browser * serverside, there might be a use case, but graphql is much more limited than edn-queries (edn = unlimited types, reverse lookups, ...), but it could work, though. I'm trying out datascript serverside now (adding durability), and the api is: send edn queries. This is more or less the idea of that adi library. There's a talk of Stuart Halloway about 'how to screw other devs' (or 'how to make money as a consultant') - the title is different, but that's what it's about more or less, in a very sarcastic way. One of his points is: the DSL - see https://vimeo.com/77199361 arount 8:02. I'm inclined to share the information model, which is just the schema (well, in Datomic, there's a restricted schema restriction, you can do the same in Datascript and put some validation on it). GraphQL is just another abstraction of that information model, having less power than datalog-queries. But again, there may be use cases where it's useful.
yeah, and the real genius here is: it's even true 🙂
@kurt-o-sys is it really compeltely fair to compare datalog and graphql though? datalog works as a query engine for a database, whereas graphql is an abstraction that can query any data source
(disclaimer: I know very little about Datalog so I might be spitting out complete nonsense)
nope, not nonsense at all.
Graphql is another abstraction. When it comes to datascript, though, I don't see much added value of an extra layer of abstraction
Although, there may be use cases where it's valuable.
you may think of a datalog abstraction for another db as well.
@kurt-o-sys that’s true… it’s also worth noting that GraphQL has a statically typed schema, which is very valuable. The same can be done Datomic/Datascript with extra attributes specifying a schema but it’s not “built-in”
well, in Datomic, there is a scheme...
Datascript is much more free...
The datomic schema doesn’t specify what attributes are allowed on an entity though. It only specify which attributes exist, and you may attach them to any entity
right...
True, but than again, the attributes you define are usually namespaced, so you define a kind of composable mixins (a bit like graphql interfaces?) for entities. Not sure if that makes sense 😛. Anyway, the namespaces attributes are somewhat like concepts, which can be composed to construct an entity (does that make any sense)?
I had issues defining entities in an elegant (composable) way for quite some business cases using types.