Fork me on GitHub
#graphql
<
2017-09-29
>
hlship00:09:26

Well, firstly, that's the only option in released code.

hlship00:09:32

Secondly, GraphQL's schema grammar doesn't have a place to specify any logic; that fits ok with the JavaScript RI, where a single function is responsible for everything, but in Lacinia, you provide the necessary resolvers as function callbacks.

hlship00:09:30

In addition, we at Walmart, but also others using Lacinia, have seen great benefit in building up the schema procedurally, using standard Clojure data manipulations. Our experience with Clojure leads us to solutions that can be done as much as possible inside Clojure ... and testable at the REPL.

crimeminister14:10:10

I am wondering if you might be willing to explain a little more how it is that you build up the schema using Clojure data manipulation and what benefits you find accrue as a result? I am in the beginning stages of using Lacinia for a new project and it sounds as though your experience would be instructive!

rickmoynihan14:10:15

Can’t speak for hlship - but we build up a lacinia/graphql schema programatically on the basis of data in a graph database. It allows us to dynamically create graphql schemas on the basis of data. Very powerful.

rickmoynihan14:10:22

(incidentally I consider graphql to be more treeql… it’s not really graphy at all - and our choice to use graphql is nothing to do with using a graph database already)

rickmoynihan14:10:34

you could do the same thing for any other database

rickmoynihan14:10:40

we need the dynamicity though… if you don’t just do it statically.

hlship00:09:32

The next Lacinia release will include the ability to parse a schema file into Lacinia's format ... but you'll still have the ability to manipulate that structure before compiling it for execution.

boubalou00:09:41

I personally think that EDN rocks. Been there for the past few months writing 3 different projets using Lacinia and EDN fits perfectly. Very modular and easily interpreted to inject stuff on needs.

eoliphant01:09:02

Yeah I’m loving that it’s in EDN, been doing some crazy stuff with going from datomic schemas to lacinia EDN, and vice versa.. It’s a breeze

juanjo.lenero03:09:07

thanks, I can definitely see the value in being able to manipulate a schema in EDN.

lilactown17:09:56

I think that just having some process (even a separate compiler) to do schema->EDN would be really great

lilactown17:09:14

our company is currently working on defining a huge project using GraphQL and I'm keeping my eye on lacinia/pedestal, but a lot of work will be done just in defining the schema

lilactown17:09:49

having the ability to define that schema and then convert it to EDN would help a lot, rather than having to re-write it by hand

hlship19:09:39

Well, the intent on compiling the schema from the GraphQL grammar is to make it easier to share a schema across platforms.