With Postman, you can create a collection that is a way of grouping your Type Task Įven though GraphQL APIs are self-documenting, having examples of common patterns of using theĪPI can be very useful. Ĭhoose the Body type as raw as shown in the image below. So for the local instance, the URL will be: and for the remote one. We’ll use the example of building a GraphQL API for a TODO app for this blog post.Īs an initial step, we’ll post the following GraphQL schema for our application to both our local and remote endpoints. With Dgraph you can turn a GraphQL schema into a running GraphQL API To see these features, we’ll use the Dgraph server that should be already running from Step 1 above. Some other features like GraphQL variables, Postman environment variables, query auto-completion. Now that we have had a look at how GraphQL queries work in Postman, we’ll also take a look at Benefits of using Postman with GraphQL queries In the next part, we’ll see how can we post a new schema to our cluster and execute some queries and mutations based on that. But since both the local and remote APIs don’t yet have a schema to serve, you would get a null schema back. That’s it! Now you can hit the Send button and get the GraphQL schema that is being served by yourĭgraph cluster.
0 Comments
Leave a Reply. |