40 GraphQL interview questions with answers
40 GraphQL interview questions with detailed answers, sorted from basic to advanced. Free to practice, with progress saved automatically.
All GraphQL interview questions
What is GraphQL and how does it fundamentally differ from REST?
What is a GraphQL schema and why does it matter?
How do queries, mutations and subscriptions differ?
What is a resolver and what arguments does it receive?
What does the exclamation mark mean in a schema and why be careful with it?
Why use variables instead of interpolating values into the query string?
What are fragments used for in real applications?
Can a GraphQL response contain both data and errors? How should clients handle it?
What is the N plus one problem in GraphQL and how is it solved?
How does a normalized GraphQL client cache work and what does it require?
Why is cursor pagination preferred in GraphQL?
Where should authorization live in GraphQL and why is it harder than in REST?
Why does a public GraphQL API need depth and cost limits?
How do persisted queries differ from an allowlist?
What should a mutation return and how should its input be designed?
How does GraphQL handle API change without versioning?
Why is HTTP caching hard for GraphQL and how can it be regained?
What does schema-driven code generation give client teams?
When should subscriptions be used and what do they cost operationally?
How do interfaces and unions differ and when is each used?
What are custom scalars for and what trap should be avoided?
When are the include and skip directives used?
Where should mutation input validation live?
What should rate limiting for a GraphQL API be based on?
How do schema-first and code-first approaches differ?
Where should purely UI state live when using GraphQL?
At what level should GraphQL server performance be measured?
What should testing a GraphQL server focus on?
How should file uploads work with GraphQL?
When should a query be sent with GET rather than POST?
What problem does federation solve and when is it worth it?
Does serial mutation execution mean transactionality?
What problem does incremental delivery solve?
What changes should schema checks in CI block?
What matters most for a multi-tenant GraphQL system?
A downstream failure makes the whole response null. Why, and how is it handled?
How should a REST system start migrating to GraphQL?
Why should a schema not mirror database tables?
What do you look at first to judge the health of a running GraphQL API?
When is GraphQL not a good fit?