Recall & Review
beginner
What is Schema-first development in GraphQL?
Schema-first development means you start by writing the GraphQL schema first. This schema defines the types and operations your API will support before writing any code.
Click to reveal answer
beginner
Why is schema-first development helpful?
It helps teams agree on the API design early. The schema acts like a contract between frontend and backend, making development clearer and faster.
Click to reveal answer
beginner
In schema-first development, what do you write after the schema?
After the schema, you write resolvers. Resolvers are functions that tell the server how to get the data for each field in the schema.
Click to reveal answer
intermediate
How does schema-first development compare to code-first?
Schema-first means writing the schema first, then code. Code-first means writing code first and generating the schema from it. Schema-first focuses on design upfront.
Click to reveal answer
beginner
Give an example of a simple GraphQL schema definition in schema-first development.
type Query { greeting: String } defines a Query type with a greeting field that returns a String.
Click to reveal answer
What is the first step in schema-first development?
✗ Incorrect
Schema-first development starts by writing the GraphQL schema first.
What does the schema act as in schema-first development?
✗ Incorrect
The schema defines the API contract that frontend and backend agree on.
What do resolvers do in schema-first development?
✗ Incorrect
Resolvers provide the data for each field defined in the schema.
Which is true about schema-first vs code-first?
✗ Incorrect
Schema-first means schema first, code-first means code first.
Which GraphQL type is usually defined first in schema-first development?
✗ Incorrect
The Query type is usually defined first as it is the entry point for reading data.
Explain the main idea of schema-first development in GraphQL.
Think about what you create before any code.
You got /3 concepts.
Describe the difference between schema-first and code-first development approaches.
Focus on what comes first in each approach.
You got /3 concepts.