This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-07
Channels
- # aleph (15)
- # beginners (186)
- # boot (11)
- # bristol-clojurians (1)
- # clara (1)
- # cljdoc (2)
- # cljs-dev (5)
- # clojure (57)
- # clojure-austin (1)
- # clojure-dev (87)
- # clojure-italy (7)
- # clojure-spec (5)
- # clojure-uk (56)
- # clojurescript (18)
- # cursive (29)
- # data-science (10)
- # datomic (84)
- # duct (83)
- # figwheel-main (4)
- # fulcro (42)
- # jobs (3)
- # lambdaisland (2)
- # off-topic (28)
- # parinfer (3)
- # portkey (3)
- # re-frame (28)
- # reitit (7)
- # remote-jobs (8)
- # shadow-cljs (29)
- # spacemacs (30)
- # specter (6)
- # sql (8)
- # tools-deps (60)
@valtteri @rgb.ide It may be worth noting than a GraphQL-style API is usually more general than a REST - by which I mean that if you have set up a GraphQL-style engine, building a REST API on top of that is fairly easy: you could have each REST point be implemented with a constant GraphQL(-ish) query, and links between entities can be expressed via an :entity/href
attribute
in other words, you could view GraphQL and the like as a programming language for implementing REST APIs
Of course, you may want to choose a server-side library that is simpler and more programmable than GraphQL, and that's where I bring my shameless plug: https://github.com/vvvvalvalval/d2q
@U2J4FRT2T not sure I understand the question, what are you missing currently?
I prefer way more rest than graphql, graphql loses all the HTTP semantic power and I don't really like it
I really like the ability to select which fields you want, and to have subscriptions. You can have your custom update with just the information you want to see.
also, I really like that GraphQL has a single format. REST can grow wild in which every endpoint returns slightly different data
that is ofcourse also behaving yourself, but that turns out to be harder than it seems
also, I think GraphQL is agnostic of transport layer
Rest encourages you to implement them. Yada does a lot of work to make sure the right status code is generated.
graphql is a formatting standard, where a “squint your eyes” summary would be “what if you had SQL but in JSON” 🙂
Then, if you squint really hard, you get cross eyed: https://simonwillison.net/2018/Oct/4/datasette-ideas/
That said, the difference between GraphQL and SQL is that GraphQL is literally formatting: which is why you can’t optimise the query in the same way as you can with SQL and relational algebra
This is good because it allows to decouple data formatting from storage and query performance
But I love that someone went “actually you know what, we’ve had something that worked for ages already” :D
I'm trying to find some benchmarks relating to execution speeds of graalvm vs openjdk. Not native image. Anyone have some convenient links? Particularly as it relates to Clojure
I think https://jsonapi.org/ does a very good job with creating a good standard for how to write rest apis
My favourite feature of GraphQL is that clients have to explicitly request fields that they want
Where I work, our GraphQL endpoint is not publicly exposed, so we always know which fields are in use, and which are not
This means we can statically determine if a change to the schema is going to break things on the client