Testing GraphQL queries and mutations
Let’s write queries and mutations in a real GraphQL schema to test the skills you have learned up to this point using GitHub’s GraphQL API explorer. 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 in the gray area in Figure 13.1):
- The left-hand section is divided into two subsections – an upper section for writing queries and a bottom section for defining variables.
- The middle vertical section shows the response.
- 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.
Figure 13.1 – GraphQL API Explorer...