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 #59

Closed jnicklas closed 4 years ago

jnicklas commented 4 years ago

From https://github.com/bigtestjs/server/issues/29 and #34

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.