Let's start by building a query. We'll do this by choosing an endpoint. One of them is called viewer and, according to the documentation, will give us information about the currently authenticated user. To use this endpoint, we have to write the following in the query builder:
{
viewer {
}
}
If we try and run this query, it will return a parse error message. The reason for this is that we are still missing an important piece of information – the parameters about the viewer that we want the API to return.
There is an optional query keyword that can be placed in front of a query request, like this:
query {
viewer {
}
}