January 2019
Intermediate to advanced
460 pages
10h 33m
English
We can test this query using any HTTP client, such as Postman, Insomnia, or any you are used to. This book covers HTTP clients in the next section of this chapter. If you want to send the following queries on your own, you can read the next section and come back here.
You can test our new function when you send the following JSON as a POST request to http://localhost:8000/graphql:
{ "operationName": null, "query": "{ posts { id text } }", "variables": {} }
The operationName field is not required to run a query, but it is great for logging purposes.
The query object is a JSON-like representation of the query we want to execute. In this example, we run the RootQuery posts and request the id and text fields of every ...
Read now
Unlock full access