OlegIlyenko / sangria-relay-playground

An example of GraphQL server supporting Relay written with Play and sangria

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sangria-relay playground

This is an example of GraphQL server supporting Relay written with Play framework and Sangria, it also use webpack for client side assets generation.

This example is based on the Relay Star Wars example you can find more info here.

It also serves as a playground - on the right hand side you see a textual representation of the GraphQL schema which is implemented on the server and you can query here. On the left hand side you can execute a GraphQL queries and see the results of it's execution.

This is just a small demonstration. It really gets interesting when you start to play with the schema on the server side. Fortunately it's pretty easy to do. Since it's a simple Play application using webpack, all it takes to start playground locally and start playing with schema is this:

$ git clone https://github.com/ykad4/sangria-relay-playground.git
$ cd sangria-relay-playground
$ npm install
$ webpack
$ sbt run

Now you are ready to go to http://localhost:9000 for the playground or to http://localhost:9000/starwars for the minimal Star Wars example.

The prerequisites are SBT, Java 8, npm, babel and webpack.

About

An example of GraphQL server supporting Relay written with Play and sangria

License:Other


Languages

Language:CSS 33.9%Language:JavaScript 23.5%Language:HTML 22.3%Language:Scala 20.4%