Skip to main content

How to Use This Guide

7 sections | ~2.5 hours total | Interview preparation


This is not a cheat sheet. The goal is not to hand you a list of definitions that you can repeat back in an interview and hope the interviewer accepts. That goal fails for two reasons. First, at companies where GraphQL is a first-class investment, the interviewers usually know the material deeply. They can tell at once between a candidate who has memorized a definition and a candidate who has internalized a principle. Second, even if memorization works in the room, it fails on the job, which is what you actually want the job for.

The goal of this guide is fluency. Fluency is the ability to reason through a question you have not seen before using principles you have internalized from questions you have. Every Q&A entry in this guide is structured accordingly. There is a question, then a short answer that gives the interviewer the conclusion. After that comes a longer "why this is right and what interviewers want to hear" section, covering the underlying mechanism, the common wrong answers, and the difference between an adequate answer and a great one. Read the short answer once. Then read the long section twice.

Why Length Matters​

There is a temptation, when preparing for technical interviews, to hunt for the shortest possible correct answer. This is optimizing for the wrong thing. An interview is a conversation rather than a trivia quiz, and nobody wins it by buzzing in with a correct three-word answer. The signal the interviewer wants is whether you can think out loud in the domain. Candidates who give the two-sentence answer and stop talking are telling the interviewer that they have memorized two sentences. The strongest candidates give the two-sentence answer, then spend ninety seconds on why that answer is the right frame, what would change in a different context, and what the wrong answers look like. That is what understanding the material sounds like.

The long sections in this guide exist to give you the vocabulary, the mental models, and the connective tissue you need to think out loud in that way. Not to give you a script to recite, if you try to recite a script, the interviewer will hear you reciting it, but to give you enough material that your own reasoning in the room is informed and specific.

The Structure of Each Entry​

Each question in this guide follows a consistent three-part structure.

The question is phrased as an interviewer would phrase it. Sometimes that means it is somewhat open-ended ("What is the N+1 problem and how do you solve it?") and sometimes it means it points at a specific trade-off ("What is the difference between an interface and a union in GraphQL?"). In both cases, read the question as a launching pad for a conversation, not as a fact-retrieval prompt.

The short answer is what you should establish in the first thirty seconds of your response. It gives the conclusion. It shows you know the territory. But it should not be where you stop.

Why this is right / what interviewers want to hear is the long section that follows. It explains the underlying principle, describes the common wrong answers that interviewers hear (and why they are wrong), and explains what separates an answer that makes an interviewer write "strong yes" from one that produces a polite pass. In many entries this section will reference specific patterns from our tutorials, real-world examples from public schemas, and the specific reasoning that makes the answer correct instead of merely definitionally accurate.

What Interviewers Are Actually Measuring​

It helps to know what the people asking these questions are trying to find out. A GraphQL interviewer running a technical screen is not trying to verify that you can pass a trivia quiz about GraphQL. They are trying to answer three questions about you.

The first question is whether you have actually built something non-trivial with GraphQL. Candidates who have built real production GraphQL APIs answer these questions differently from candidates who have read the spec and the tutorial. They have opinions. They have scars. They know which problems sound easy in theory and hurt in practice. The N+1 problem is the standard example. Every candidate can recite the definition, and the ones who have fixed it can describe what discovering it in production felt like. The long sections in this guide are designed partly to give you access to that kind of production knowledge, whether or not you have personally hit every problem described.

The second question is whether you can reason, not just recall. Compare two answers to the same question:

DataLoader is a batching library.

DataLoader works because it defers resolution until the end of the current event loop tick. That gives every sibling resolver in the query time to register its loads, and DataLoader then fires one batch query in place of N individual ones. It has to be request-scoped because the cache it maintains should not carry data from one user's request into another user's.

Both answers are correct, and only the second shows the interviewer how the candidate got there, which is what the question is actually testing.

The third question is whether you have opinions and judgment. The best technical conversations in an interview are not about facts; they are about trade-offs. "When would you prefer cursor-based pagination to offset pagination?" is not asking you to recite the difference. It is asking you to exercise judgment. The entries in the schema design and performance chapters are particularly weighted toward this kind of judgment question.

How to Actually Prepare​

Read this guide in order. The chapters build on each other. The core concepts chapter establishes vocabulary that every subsequent chapter uses. The schema design chapter assumes you understand resolvers. The performance chapter assumes you understand schema design well enough to recognize the choices that create N+1 problems. Skipping ahead may leave you with answers that are technically correct but contextually thin.

After reading each chapter, practice out loud. This sounds uncomfortable. It is. But thinking about an answer and saying an answer are different cognitive acts. The version of yourself that has said a thing out loud, heard the hesitations, and noticed the gaps in your reasoning is better prepared than the version who has only read. If you cannot speak an answer smoothly, not from script, but from genuine understanding, you need to spend more time with the underlying material.

The underlying material, for this guide, is our tutorial series. This guide is not a replacement for those tutorials. It is a structured review designed for someone who has worked through the Spring GraphQL tutorials (or built an equivalent amount of experience), and who wants to convert that experience into interview fluency. If a question in this guide brings no clear image of the code or system behind it, go back and read the relevant tutorial chapter, or build the thing it describes.

The specific tutorials that prepare you for each section of this guide:

  • Core concepts: The Spring GraphQL Tutorial classes 1 through 7 cover the resolver model, DataLoader, and the three operation types in practical context.
  • Schema design: our Schema Design course (in preparation) covers nullable vs. non-null, pagination patterns, the userErrors pattern, and breaking changes in depth. Until it lands, Spring GraphQL Tutorial class 2 and class 11 cover the same ground against running code.
  • Performance: our Performance Engineering course (in preparation) covers the N+1 problem and its fixes exhaustively. Today the nearest thing is Spring GraphQL Tutorial class 8, on @BatchMapping and batch loading.
  • Security: our Securing Spring GraphQL APIs post covers authentication, field-level authorization, and the common attacks, and Chapter 4 below sets out the five attack categories.
  • Federation: our Federation course (in preparation) introduces entities, keys, the query planner, and federated authorization. Chapter 5 below is self-contained on the mechanics an interview asks about.
  • Production operations: the operations-focused content in our Spring GraphQL Tutorial.

Three of those are marked in preparation, which means they are written and not yet published, so there is nothing to link to yet. Each entry says what to read in the meantime, and the chapter in this guide stands on its own either way.

If you have worked through those courses and built the companion code, this guide should feel like revision. If it does not, the gap is in the underlying material, not in this guide, and the guide will tell you by showing you questions you cannot yet answer from first principles.

One More Thing About Whiteboard Conditions​

Interviews often simulate pressure: time limits, someone watching, the awareness that your answer matters. A defense against pressure is not to relax (pressure does not care about your intentions) but to have answered the question before, out loud, from your own understanding. The single most reliable preparation strategy is to pick three or four questions from each chapter of this guide and explain them to someone: a friend, a colleague, or a phone camera. Keep going until you can do it with the guide closed, in your own words. That is the standard. This guide is the material. The practice is yours to do.

Good luck. The goal is not to memorize. The goal is to understand deeply enough that you cannot be confused by a question you have not seen before.