A GraphQL query is a client-specified operation that selects exactly which fields and related data a GraphQL API should return. A single endpoint processes the query and returns JSON shaped like the requested selection. section 10.2.1
Queries reduce overfetching, underfetching, and extra round trips by combining related data in one request. They can select fields from board games, domains, and mechanics through their relationships. section 10.2.1 section 10.2.4
query {
boardGames(order: { id: ASC }, first:3 ) {
nodes {
id
name
year
}
}
}
Use the compact board-game query to see field selection, ascending ordering, and a three-item limit expressed in GraphQL syntax. section 10.2.4
A practical query workflow is:
- Open BananaCakePop at the GraphQL endpoint, create a document, and enter the operation in the Operations tab. section 10.2.4
- Choose only the required fields, then add arguments for filtering, ordering, or limiting results. section 10.2.4 section 10.5.1
- Run the query and compare the response with the selection; the returned nodes should contain no unrequested board-game fields. section 10.2.4
- Use a separate mutation when changing data, and authenticate it with a suitable bearer token before verifying and rolling back the change. section 10.5.2
Filtering and selecting board games
A query can request board games whose names start with "War", order them by name ascending, limit the result to ten, and select game fields plus related domain and mechanic IDs and names. section 10.5.1
Client-defined queries add flexibility but also responsibility: deeply nested, circular, nonindexed, or otherwise unoptimized requests can increase server overhead, slow execution, or crash the server. section 10.2.2

