re: What is GraphQL and how to use it VIEW POST


In this tutorial you're testing the input/output by the Graphiql web UI.
How would I make the request from within the code, instead of the UI?


You could send a HTTP POST request to the graphql server. For example using curl you can call the hello endpoint as follows

curl -X POST -H "Content-Type: application/json" -d "{\"query\": \"{ hello }\"}" http://localhost:5000/graphql

You can checkout the following url to know more about accessing the graphql endpoints from a client.

code of conduct - report abuse