Testing GraphQL queries and mutations
Let's write queries and mutations in a real GraphQL schema to test the skill you have learned throughout this chapter.
You are going to use GitHub's GraphQL API explorer in this section. Let's perform the following steps:
- First, go to https://docs.github.com/en/graphql/overview/explorer.
- You might have to authorize it using your GitHub account, so that you can execute GraphQL queries.
- GitHub Explorer is based on GraphiQL. It is divided into three vertical sections (from left to right):
a. There are two two subsections – an upper section for writing a query and a bottom section for defining variables.
b. The middle vertical section shows the response.
c. Normally, the rightmost section is hidden. Click on the Docs link to display it. It shows the respective documentation and schema, along with the root types that you can explore.
- Let's fire this query to find out the ID of the repository you wish to...