-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert command server to GraphQL endpoint #143
Labels
Comments
cowboyd
referenced
this issue
in bigtestjs/server
Dec 6, 2019
From https://github.com/bigtestjs/server/issues/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][1] 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. [1]: https://graphql.org/learn/serving-over-http/#node
cowboyd
referenced
this issue
in bigtestjs/server
Dec 6, 2019
From https://github.com/bigtestjs/server/issues/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][1] 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. [1]: https://graphql.org/learn/serving-over-http/#node
cowboyd
referenced
this issue
in bigtestjs/server
Dec 6, 2019
From https://github.com/bigtestjs/server/issues/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][1] 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. [1]: https://graphql.org/learn/serving-over-http/#node
cowboyd
referenced
this issue
in bigtestjs/server
Dec 6, 2019
From https://github.com/bigtestjs/server/issues/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][1] 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. [1]: https://graphql.org/learn/serving-over-http/#node
cowboyd
referenced
this issue
in bigtestjs/server
Jan 27, 2020
From https://github.com/bigtestjs/server/issues/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][1] 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. [1]: https://graphql.org/learn/serving-over-http/#node
This is done. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)
Right now, the command server doesn't do anything except echo the text "Your wish is my command" to any response. Instead, it should be a full GraphQL endpoint. The GraphQL endpoint should only handle responses of type
application/json
so that later we can serve the web UI overtext/html
The goal here is to get the GraphQL interpreter in place, not to actually do anything with it yet, so we'll define and implement minimal schema that just contains an
echo
query that can be used to verify that the http mechanics are up and running:thus
query:
{ echo(text: "hello world") }
response:
{ "echo": "hello world" }
The text was updated successfully, but these errors were encountered: