Build the mental model
A GraphQL query is a tree-shaped selection set inside curly braces, listing exactly the fields you want. When an object-type field (such as `author`) includes a sub-selection, that becomes a nested query. If you need to call the same field twice with different arguments in one query, an alias (`featured: tutorials`) renames the result key so both can coexist.
Connect it to a real scenario
For the tutorial card component, request `tutorial(id: "42")` with `id`, `title`, and a nested `author { name }`. On the homepage, fetch a featured list and a latest list from the same `tutorials` field in one query using two aliases.
Try the working example
query TutorialCard {
tutorial(id: "42") {
id
title
author {
name
}
}
featured: tutorials {
title
}
latest: tutorials {
title
}
}You can write a query that uses nested field selection and aliases.5-minute try-it
Query `tutorial(id: "7")` for `title` and nested `lessons { title }`, then call `tutorials` twice under `featured` and `archived` aliases.
One important caution
Leaving off the selection set under an object-type field causes a validation error — only scalar fields can be leaves.
GraphQL — Queries and Mutations — GraphQL