A GraphQL server implements query depth limiting to:
A deeply nested GraphQL query (e.g., friends.friends.friends.posts.comments...) can cause exponential database load. Depth limiting rejects queries beyond a set nesting level (typically 5–10 levels).
2 / 15
Query cost analysis assigns costs to queries based on:
Each field in a schema can be assigned a cost multiplier. A list field has higher cost than a scalar; a federation entity resolution adds cost. The total query cost is checked against a threshold before execution.
3 / 15
Which GraphQL schema change is a breaking change?
Removing a field breaks existing client queries that include it — they will receive a validation error. Safe changes include: adding optional fields, adding new types, adding enum values (with caution if clients use exhaustive switches).
4 / 15
The @deprecated directive is used to:
@deprecated is a built-in GraphQL directive: legacyId: ID @deprecated(reason: "Use id instead"). GraphQL tools surface deprecation warnings to developers. The field still works until it is actually removed in a future schema version.
5 / 15
Fill in the blank: "We used Apollo Studio to catch ___ before deployment."
Apollo Studio (and similar schema registry tools) performs schema change analysis — comparing the new schema to the previous version and flagging breaking changes (removed fields, changed types, non-null additions) before the change reaches production.
6 / 15
Code Review Comment: 'The query is exceeding the configured depth limit of 5. This could lead to performance issues and increased API costs. Consider optimizing the query or adjusting the governance rules.' What does 'governance rules' most likely refer to in this context?
Governance rules in this scenario refers to the predefined constraints and policies enforced around GraphQL operations—specifically, limits like query depth or rate limiting—to manage performance and costs. Option A is too broad; options C and D are irrelevant to GraphQL operation control. This helps ensure consistent and efficient usage of the API.
7 / 15
Slack Message: '@john.doe, our new API Gateway is now tracking query costs based on complexity. The initial analysis shows that queries retrieving large datasets are significantly more expensive. We need to prioritize optimizing these.' What does 'query complexity' likely represent here?
'Query complexity' in this context refers to factors impacting the resource consumption of a GraphQL query—primarily data volume and processing operations like joins or aggregations. While HTTP requests (option A) are part of performance, they aren't the core driver of cost in complex queries. Option B is irrelevant; option D focuses on response time, not resource use.
8 / 15
PR Description: 'Implemented a breaking change to the User schema – specifically, removed the optional `phoneNumber` field. This was necessary due to GDPR compliance requirements. Please ensure all dependent clients update their code accordingly.' What does 'breaking change' signify in this context?
A 'breaking change' in a GraphQL schema indicates that existing client applications relying on the previous API contract – specifically, the optional `phoneNumber` field – will require modification because the fundamental structure of the data has been altered. This is crucial for maintaining compatibility and preventing unexpected behavior after an upgrade.
9 / 15
Standup Update: 'I've added the @deprecated directive to the old `getProductDetails` query. We're migrating users to the new `getDetailedProductInfo` endpoint.' What is the primary purpose of the @deprecated directive?
The @deprecated directive serves to signal that a GraphQL field or query is no longer recommended for use—it's a warning indicator. It doesn't enforce rate limits or automatically generate documentation; its purpose is purely to alert developers to the deprecated nature of the resource and guide them towards alternative solutions.
10 / 15
Code Review Comment: 'The API Gateway configuration should explicitly define a limit on the maximum number of concurrent requests for this endpoint to prevent overload. This is crucial for governance.' What does 'endpoint' refer to in this context?
In this context, 'endpoint' refers precisely to a specific resource or function exposed by the GraphQL API—a particular query or mutation that can be invoked. It's distinct from the URL (option A) and other aspects like authentication or schema versioning.
11 / 15
Code Review Comment: 'The query is exceeding the configured depth limit of 5. This could lead to performance issues and increased API costs. Consider optimizing the query or adjusting the governance rules.' What does 'governance rules' most likely refer to in this context?
Governance rules in this scenario refers to the predefined constraints and policies enforced around GraphQL operations—specifically, limits like query depth or rate limiting—to manage performance and costs. Option A is too broad; options C and D are irrelevant to GraphQL operation control. This helps ensure consistent and efficient usage of the API.
12 / 15
Slack Message: '@john.doe, our new API Gateway is now tracking query costs based on complexity. The initial analysis shows that queries retrieving large datasets are significantly more expensive. We need to prioritize optimizing these.' What does 'query complexity' likely represent here?
'Query complexity' in this context refers to factors impacting the resource consumption of a GraphQL query—primarily data volume and processing operations like joins or aggregations. While HTTP requests (option A) are part of performance, they aren't the core driver of cost in complex queries. Option B is irrelevant; option D focuses on response time, not resource use.
13 / 15
PR Description: 'Implemented a breaking change to the User schema – specifically, removed the optional `phoneNumber` field. This was necessary due to GDPR compliance requirements. Please ensure all dependent clients update their code accordingly.' What does 'breaking change' signify in this context?
A 'breaking change' in a GraphQL schema indicates that existing client applications relying on the previous API contract – specifically, the optional `phoneNumber` field – will require modification because the fundamental structure of the data has been altered. This is crucial for maintaining compatibility and preventing unexpected behavior after an upgrade.
14 / 15
Standup Update: 'I've added the @deprecated directive to the old `getProductDetails` query. We're migrating users to the new `getDetailedProductInfo` endpoint.' What is the primary purpose of the @deprecated directive?
The @deprecated directive serves to signal that a GraphQL field or query is no longer recommended for use—it's a warning indicator. It doesn't enforce rate limits or automatically generate documentation; its purpose is purely to alert developers to the deprecated nature of the resource and guide them towards alternative solutions.
15 / 15
Code Review Comment: 'The API Gateway configuration should explicitly define a limit on the maximum number of concurrent requests for this endpoint to prevent overload. This is crucial for governance.' What does 'endpoint' refer to in this context?
In this context, 'endpoint' refers precisely to a specific resource or function exposed by the GraphQL API—a particular query or mutation that can be invoked. It's distinct from the URL (option A) and other aspects like authentication or schema versioning.
This module has 15 multiple-choice exercises, each with instant feedback and a full explanation of the correct answer.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to use with no account, sign-up, or paywall.
Do I need to create an account to do these exercises?
No account is required. Just click an option to answer — your score for this session is tracked automatically in the progress bar above.
What happens if I choose the wrong answer?
You'll immediately see which answer was correct, plus a full explanation covering the vocabulary and reasoning behind it — mistakes are where most of the learning happens.
Can I retry the exercises if I want a higher score?
Yes — use the "Try again" button on the results screen to reset and go through all the questions again.
Is my progress saved if I close the page?
No. Progress is tracked only for your current visit; reloading or leaving the page resets the counter. This keeps the exercise simple and account-free.
Where can I find more GraphQL & API Gateway Language exercises?
Browse the full GraphQL & API Gateway Language hub for related drills, or check the "Next up" link below to continue with a connected topic.
How is this different from reading an article on the same topic?
Articles explain vocabulary and concepts in prose; this exercise tests and reinforces that vocabulary through active recall with immediate feedback — the two work best together.
Who writes these exercises?
Every exercise is written by the CoderSlingo team, drawing on real workplace English used in IT roles, then reviewed for accuracy and clarity.