bigtestjs / server

All BigTest development has moved to https://github.com/thefrontside/bigtest
https://github.com/thefrontside/bigtest
2 stars 1 forks source link

✨Make the Command server speak GraphQL #34

Closed cowboyd closed 4 years ago

cowboyd commented 4 years ago

Resolves #29

Rather than implement our own command interpreter we'll get one for free using GraphQL. This will allow us to not only get a command a query language (and response payload) with little effort, but we'll be able to use all of the tooling surrounding the GraphQL ecosystem (like the interactive webshell)

This uses the graphql-express packgage recommended by graphql.org to implement a graphql endpoint that satisfies our requrements. It serves graphql over simple GET and POST requests that accept application/json, but if the request is for html, then it will server the GraphiQL IDE.

Since the raw http server is not used anymore, the code dedicated to it has been removed.

Over application/json

2019-12-06 12 55 50

Graphical shell over text/html

2019-12-06 12 50 59

jnicklas commented 4 years ago

🚢