A resolver is a function attached to a field in the GraphQL schema that knows how to fetch that field's value. When a query arrives, the GraphQL engine walks the requested fields and invokes their resolvers, which may read from a database, call another service, or compute a value. Resolvers receive arguments like the parent object, field arguments, and a shared context (e.g. the authenticated user). This per-field resolution is what lets clients request exactly the fields they want, but it also creates performance pitfalls like the N+1 problem.
2 / 5
What is the N+1 query problem in GraphQL, and how does a DataLoader solve it?
The N+1 problem arises when a query returns a list of N parent objects and each parent's child field resolver runs its own query — one query for the list plus N for the children. For 100 posts, that is 101 database round-trips. A DataLoader fixes this by batching: it collects all the individual child requests made during one tick of the event loop and issues a single batched query (e.g. WHERE id IN (...)), and it caches within the request to deduplicate. This turns N+1 into 2 queries and is essential for performant GraphQL.
3 / 5
In GraphQL schema design, what is the difference between a query and a mutation?
By convention and design, queries are read-only operations for fetching data, and the GraphQL engine may resolve their top-level fields in parallel since reads have no side effects. Mutations represent writes (create/update/delete) and their top-level fields are executed sequentially, one after another, so that ordered changes do not race. A well-designed mutation also returns the modified object (or a payload type) so the client can update its cache without a follow-up query. Keeping reads in queries and writes in mutations is a core schema-design discipline.
4 / 5
Why is GraphQL schema versioning typically handled by evolution (deprecation) rather than v1/v2 endpoints?
REST often versions via separate endpoints (/v1, /v2) because changing a response shape breaks clients. GraphQL avoids this: since each client explicitly selects the fields it wants, you can add new fields freely without affecting anyone, and retire old ones by marking them @deprecated (with a reason) while monitoring usage. When no client requests a deprecated field, you can safely remove it. This continuous evolution model means a single, always-current schema rather than a proliferation of versioned APIs.
5 / 5
What is over-fetching and under-fetching, and how does GraphQL address them?
In a fixed REST endpoint, over-fetching means the response includes fields the client does not need (wasted bandwidth), and under-fetching means one endpoint does not return enough, forcing multiple round-trips to assemble a view. GraphQL addresses both by letting the client declare exactly the fields and nested relationships it wants in a single query: no more, no less, in one request. This precision is GraphQL's headline benefit, though it shifts complexity to the server (resolvers, query cost analysis, and guarding against expensive deeply-nested queries).
What does the "GraphQL Schema Design" vocabulary exercise cover?
This exercise tests real IT vocabulary related to graphql schema design through 5 multiple-choice questions, each built from realistic workplace sentences rather than abstract definitions.
Is this vocabulary exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is completely free — no account, sign-up, or payment required.
How many questions does this exercise have?
This exercise has 5 questions. Each one shows a real-world sentence or scenario with multiple-choice options and an explanation once you answer.
What happens after I answer a question?
You'll see immediate feedback showing whether your answer was correct, along with a short explanation of why — then a button to move to the next question, and a full results screen at the end.
Can I retry the exercise if I get questions wrong?
Yes. Once you reach the results screen, click "Try again" to reset your answers and go through the exercise from the start as many times as you like.
Do I need to create an account to take this exercise?
No account is needed. Your answers are scored in your browser during the session — nothing is saved to a server, so you can jump straight in.
Is my progress saved if I leave the page?
No — progress within an exercise resets if you navigate away or reload. Each exercise is short enough to complete in a few minutes in one sitting.
Are these vocabulary exercises connected to other topics?
Yes — browse the full vocabulary exercises hub to find related modules covering adjacent IT topics and roles.
How is this different from reading a glossary or blog article?
Exercises like this one are active recall drills — you have to choose the correct term or phrasing yourself, which builds retention faster than passively reading a definition.
Where can I find more vocabulary exercises?
Browse the full Vocabulary exercises hub for hundreds of modules covering Agile, DevOps, security, databases, architecture, and more — organised by IT role and skill.