Recall & Review
beginner
What is a GraphQL query?
A GraphQL query is a request sent to a GraphQL server to ask for specific data. It lets you specify exactly what information you want.
Click to reveal answer
beginner
How do you write a simple GraphQL query to get a user's name and email?
You write it like this:<br>
{ user { name email } }This asks for the user's name and email only.Click to reveal answer
beginner
Why is GraphQL called a 'query language'?
Because it lets you ask (query) for exactly the data you want from a server, unlike traditional APIs that send fixed data.
Click to reveal answer
beginner
What does the curly braces {} mean in a GraphQL query?
Curly braces group fields you want to get. They show the shape of the data you want back.
Click to reveal answer
beginner
Can a GraphQL query request multiple fields at once?
Yes! You can ask for many fields in one query by listing them inside curly braces.
Click to reveal answer
What does a GraphQL query do?
✗ Incorrect
A GraphQL query asks the server for specific data you want.
Which symbol groups fields in a GraphQL query?
✗ Incorrect
Curly braces {} group the fields you want in a GraphQL query.
How do you ask for a user's name and email in GraphQL?
✗ Incorrect
The correct syntax uses curly braces to specify fields inside the user object.
Can a GraphQL query request multiple fields at once?
✗ Incorrect
GraphQL queries can request many fields together.
What is the main advantage of GraphQL queries over traditional APIs?
✗ Incorrect
GraphQL lets you specify exactly what data you want, avoiding extra data.
Explain what a GraphQL query is and how it works.
Think about how you ask a friend for exactly what you want.
You got /4 concepts.
Write a simple GraphQL query to get a user's name and email.
Use { user { name email } } format.
You got /5 concepts.