What is a GraphQL Query?

The GraphQL specification defines a query as a "read-only fetch" - essentially a request for data from your server, and getting it back.

This is analagous to a GET request against a RESTful API service.

A typical query looks like this:

{
    query queryName($tag: String!){
        posts($tag) {
            id
            title
            tag
        }
    }
}

As a side note - if your query contains no variables or directives, you can use query shorthand:

{
    posts {
        id
        title
    }
}