This is a fork of an example of a GraphQL server written with Play framework and
Sangria. It also serves as a playground.
On the right hand side you can see a textual representation of the GraphQL schema which is implemented on the server and that you can query here.
On the left hand side you can execute a GraphQL queries and see the results of its 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, all it takes to start playground locally and start playing with the schema is this:
$ git clone https://github.com/DevPhilB/sangria-playground.git
$ cd sangria-playground
$ sbt run
Now you are ready to point your browser to http://localhost:9000. The only prerequisites are SBT and Java 8.
Added some queries and mutations for demonstration.
query ListAllHumans {
humans {
id, name, friends {name}, appearsIn, homePlanet
}
}
mutation AddObiWanKenobiToHumans {
createHuman(
id: "1005",
name: "Obi-Wan Kenobi",
friends: ["1000"],
episode: [NEWHOPE, EMPIRE, JEDI],
homeplanet: "Tatooine"
) {
id, name, friends {name}, appearsIn, homePlanet
}
}