Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Top 101 REST & GraphQL API Design Interview Questions
New
2 students

Top 101 REST & GraphQL API Design Interview Questions

Master REST Semantics, GraphQL SDL, Resolvers, N+1 DataLoader, Idempotency, RFC 7807, Auth & Federation
Created byBhushan S
Last updated 10/2026
English

What you'll learn

  • Master 101 essential JavaScript and TypeScript interview questions with clear explanations, practical examples, and confident answers.
  • Understand core JavaScript concepts, TypeScript types, asynchronous programming, closures, promises, and modern ES6+ features.
  • Explain frontend and backend fundamentals, including React, Node.js, APIs, authentication, and full-stack architecture.
  • Structure clear, interview-ready answers to common full-stack development questions and explain technical decisions confidently.

Course content

5 sections • 101 lectures • 7h 40m total length
  • Q001: What are the core HTTP methods in RESTful API design, how do GET, POST,...4:08
  • Q002: How do you structure HTTP status codes in enterprise APIs, and when do ...4:07
  • Q003: What are the six architectural constraints of REST defined by Roy Field...3:48
  • Q004: How do you design clean, intuitive RESTful URIs, how do you model resou...4:10
  • Q005: When should you use Path Parameters versus Query Parameters in API desi...3:58
  • Q006: What are the most critical HTTP headers in REST APIs, and how do Conten...3:59
  • Q007: How does HTTP Content Negotiation work in enterprise APIs, and how do y...4:10
  • Q008: What is GraphQL, why did Facebook create it, and what are the architect...4:00
  • Q009: How do you model schemas using GraphQL Schema Definition Language (SDL)...4:07
  • Q010: How do GraphQL Resolvers work under the hood, what is the role of paren...4:02
  • Q011: What is the distinction between Input Object Types and Output Object Ty...3:54
  • Q012: How do built-in Scalars differ from Custom Scalars in GraphQL, and how ...4:02
  • Q013: When should you use Interfaces versus Union Types in GraphQL schema des...4:07
  • Q014: How does GraphQL Schema Introspection work under the hood, how do tools...4:04
  • Q015: What is the Richardson Maturity Model, how do Levels 0 through 3 trace ...4:02
  • Q016: Why is PUT idempotent while POST is not, why is DELETE considered idemp...4:25
  • Q017: What is RFC 7807 (Problem Details for HTTP APIs), why are custom ad-hoc...4:26
  • Q018: Why does GraphQL almost always return an HTTP 200 OK status even when a...4:30
  • Q019: Compare API Design-First (Spec-First) versus Code-First development: Wh...4:19
  • Q020: How do you design a complete production CRUD API for an eCommerce Order...4:28
  • Q021: What are enterprise best practices for designing scalable GraphQL schem...4:18
  • Q022: How do you implement modern API Mocking for frontend and mobile develop...4:15
  • Q023: Construct the exact matrix of Safe, Idempotent, and Cacheable propertie...4:21
  • Q024: What happens during the GraphQL execution pipeline when a query string ...4:22
  • Q025: When an engineering team starts a new product, what architectural rubri...4:23

Requirements

  • No prior professional experience required. Basic familiarity with programming is helpful. No software installation or coding setup needed, as this is a concept-focused interview preparation course.

Description

Ace your REST and GraphQL API Design technical interviews with total clarity and confidence.

Most API interview preparation resources rely on basic CRUD definitions or trivial syntax questions. When top tech companies, startups, and product organizations interview Backend, Full-Stack, and Platform Engineers (especially candidates with 2 to 3 years of experience), they do not just test whether you can create a route or write a basic resolver. They rigorously evaluate your understanding of under-the-hood protocol and distributed systems mechanics: HTTP idempotency and safety guarantees, RFC 7807 problem details, GraphQL AST traversal and execution pipelines, resolving the N+1 problem with DataLoader, designing distributed idempotency with Redis locks, managing breaking changes with OpenAPI and Apollo Federation, and securing APIs against the OWASP API Security Top 10.

This course is the definitive, publication-grade preparation program featuring 101 comprehensive interview questions and model answers across 5 structured engineering modules.

What Makes This Course Unique

  • Engineered for 2-3 Years Experience Candidates: Calibrated to bridge basic endpoint design with enterprise production engineering, avoiding trivial one-liners while focusing on the high-signal architectural questions actually asked in senior technical interviews.

  • Apple Keynote Visual Delivery: Every question is broken down visually in 1080p 60fps with clear, animated diagrams—from GraphQL AST parsing and DataLoader event loop batching to distributed Saga transactions and Redis SETNX locking flows.

  • Complete Spoken Model Answers (60-90s): Every lecture concludes with an authentic, interview-ready spoken answer synchronized with 3 curated visual pillars, training you to speak with clarity and technical maturity under pressure.

  • 101 Companion PDF Revision Notes: Download high-resolution study notes for every lecture, complete with architectural summaries, code blueprints, and quick-reference cheat sheets for rapid pre-interview review.

Course Curriculum Breakdown

Module 1: Foundations & Core Concepts (Lectures 1-25)

Master the protocol and architectural foundations of REST and GraphQL:

  • Core HTTP methods: GET, POST, PUT, PATCH, and DELETE semantics; safety versus idempotency

  • HTTP Status Code Hierarchy: 400, 401, 403, 404, 409, and 422 selection guidelines according to RFC 9110

  • The six Fielding constraints of REST and why statelessness enables horizontal cloud autoscaling

  • RESTful URI Design: plural noun modeling, relationship nesting depth, and eliminating action anti-patterns

  • Path Parameters vs Query Parameters: resource identity versus optional modifiers and caching impacts

  • HTTP Headers: Content-Type, Accept, Authorization, and Cache-Control header mechanics

  • Content Negotiation: multi-format serialization across JSON, Protocol Buffers, and CSV

  • GraphQL vs REST: architectural trade-offs, network efficiency, over/under-fetching, and caching paradigms

  • GraphQL Schema Definition Language (SDL): Object Types, Scalars, Queries, Mutations, and Nullability

  • GraphQL Resolvers: parent, args, context, info parameters and concurrent breadth-first AST execution

  • Input Object Types vs Output Object Types: specification constraints and parser security

  • Custom Scalars: implementing serialize, parseValue, and parseLiteral for DateTime, Email, and JSON

  • Interfaces vs Union Types: shared structure contracts versus polymorphic disjoint types

  • Schema Introspection: __schema and __type mechanics, developer tooling, and production attack surfaces

  • The Richardson Maturity Model: Levels 0 through 3 and practical HATEOAS implementation

  • Idempotency Nuances: why DELETE is idempotent despite returning 404, and network retry safety

  • RFC 7807 & RFC 9457 Problem Details: replacing ad-hoc error formats with standardized schemas

  • GraphQL Errors Array vs HTTP Status Codes: transport success vs application resolution errors and partial failures

  • API Design-First vs Code-First: team velocity, contract testing, and frontend-backend decoupling

  • CRUD API Design: production eCommerce Order API blueprints, 201 Created Location headers, and 204 No Content

  • GraphQL Mutation Best Practices: single input/payload wrappers and first-class userErrors arrays

  • API Mocking: network-level interception with Mock Service Worker (MSW) and Prism OpenAPI mocking

  • RFC 9110 Safe, Idempotent, and Cacheable Matrix across all HTTP verbs

  • GraphQL AST Lifecycle: Lexing, Parsing, Schema Validation, and Resolver Dispatching

  • REST vs GraphQL Core Decision Framework: an architectural rubric for new product development

Module 2: Intermediate Real-World Scenarios (Lectures 26-50)

Tackle the high-stakes real-world engineering challenges required for production readiness:

  • REST Pagination: Offset-based vs Keyset (Seek) pagination, O(N) table scans, and cursor stability

  • GraphQL Relay Cursor Connections: edges, nodes, cursors, and pageInfo infinite scrolling

  • Filtering & Query DSL Design: parameterized bracket syntax, GraphQL filter inputs, and injection defense

  • Multi-Field Sorting Conventions: sort direction prefixes, enum constraints, and NULLS LAST ordering

  • Input Validation: layered gateway and controller validation using Zod, JSON Schema, and RFC 7807 422 errors

  • File Upload Architecture: why multipart form-data congests backends versus direct S3 Pre-Signed URLs

  • The GraphQL N+1 Problem Under the Hood: independent resolver execution and database connection starvation

  • DataLoader Architecture: Node.js process.nextTick batching coalescing and per-request memoization caches

  • Schema Stitching vs Apollo Federation: programmatic gateway delegation versus declarative subgraph composition

  • Idempotency Keys in Distributed Payment APIs: UUID protocols, Redis SETNX atomic locking, and 24h replay caching

  • Webhooks Architecture: HMAC-SHA256 signatures, timestamp replay attack prevention, and queued delivery

  • Long-Running Asynchronous Operations: HTTP 202 Accepted, Location status polling, and terminal state transitions

  • Optimistic Concurrency Control: Strong ETags, If-Match headers, and 412 Precondition Failed

  • Partial Updates: PUT vs PATCH vs JSON Patch (RFC 6902) vs JSON Merge Patch (RFC 7396)

  • Soft Deletes vs Hard Deletes: deleted_at modeling, unique constraint index collisions, and GDPR compliance

  • Nested Resource Mutations: single atomic GraphQL mutations versus multi-step REST transactional endpoints

  • Field-Level Authorization: fine-grained resolver security in GraphQL versus route middleware in REST

  • Rate Limiting Headers: X-RateLimit-Limit, Remaining, Reset, and HTTP 429 Retry-After compliance

  • API Throttling: the Thundering Herd problem and exponential backoff with randomized Full Jitter

  • Cross-Origin Resource Sharing (CORS): Same-Origin Policy, preflight OPTIONS handshakes, and credentials

  • HTTP Caching Directives: max-age, s-maxage, public, private, no-cache, and no-store

  • Conditional HTTP Requests: If-None-Match, If-Modified-Since, and 304 Not Modified empty-body responses

  • Client-Side GraphQL Caching: Document caches (urql) versus Normalized caches (Apollo, Relay)

  • Real-Time APIs: GraphQL Subscriptions over WebSockets versus Server-Sent Events (SSE)

  • GraphQL Directives: @include, @skip execution modifiers and custom schema authentication directives

Module 3: Advanced Architecture & Deep Dives (Lectures 51-75)

Master enterprise distributed systems, performance optimization, and schema governance:

  • API Versioning Strategies: URI Path, Custom Header, Query Parameter, and Accept Header comparison

  • API Deprecation Standards: RFC 8594 Deprecation and Sunset headers versus GraphQL @deprecated

  • GraphQL Query Complexity & Depth Limiting: protecting servers from Denial of Service AST attacks

  • Automatic Persisted Queries (APQ): bandwidth reduction, production allowlisting, and edge CDN GET caching

  • GraphQL Schema Governance: automated breaking change detection in CI/CD using Apollo Rover and GraphQL Inspector

  • OpenAPI 3.1 & Contract Testing: JSON Schema 2020-12 alignment, automated SDK generation, and Pact testing

  • API Gateways in Microservices: Envoy and Kong routing, SSL termination, and authentication offloading

  • Backend For Frontend (BFF) Pattern: decoupling Mobile and Web experiences with server-side data aggregation

  • Apollo Federation 2: subgraphs, supergraph composition, @key, @shareable, and Rust router query planning

  • gRPC vs REST vs GraphQL: Protocol Buffers binary serialization, HTTP/2 multiplexing, and latency benchmarks

  • Event-Driven APIs: Command Query Responsibility Segregation (CQRS), Event Sourcing, and AsyncAPI specs

  • Distributed Tracing: OpenTelemetry instrumentation, W3C Trace Context (traceparent), and span propagation

  • API Observability: structured JSON logging, correlation IDs, and monitoring p95/p99 tail latency

  • Resiliency Patterns: Circuit Breakers (Closed, Open, Half-Open states) and Bulkhead resource isolation

  • Graceful Degradation: tiered dependency classification, stale-cache fallbacks, and resilient UI delivery

  • CDN Edge Caching: Surrogate-Control, Surrogate-Keys (Cache Tags), and stale-while-revalidate with Fastly/Cloudflare

  • Zero-Trust API Architecture: Mutual TLS (mTLS) cryptographic handshakes and SPIFFE/SPIRE workload identities

  • Multi-Tenant API Design: tenant context resolution, database isolation models, and PostgreSQL Row-Level Security

  • High-Throughput Connection Management: TCP socket exhaustion (TIME_WAIT) and PgBouncer connection pooling

  • API Payload Compression: Gzip vs Brotli benchmarks, JSON memory limits, and NDJSON streaming

  • GraphQL Incremental Delivery: @defer for slow fragments and @stream for long lists over HTTP multipart streams

  • Bulk & Batch Operations: transactional atomicity versus HTTP 207 Multi-Status partial success

  • Domain Modeling with Unions vs Interfaces: inheritance contracts versus disjoint polymorphic evolution

  • Schema Evolution: the Expand-and-Contract (Parallel Run) pattern for zero-downtime database and API refactoring

  • Developer Experience (DX): interactive documentation (Scalar/Redoc), idiomatic SDKs, and sandbox environments

Module 4: Tricky Edge Cases & Problem-Solving (Lectures 76-90)

Solve the complex, edge-case production scenarios that interviewers use to identify top engineers:

  • Distributed Transactions: Two-Phase Commit (2PC) bottlenecks versus Saga Orchestration and Choreography

  • Atomic Idempotency Locking with Redis: SETNX locks, in-flight collision handling, and 24h response caching

  • Preventing Race Conditions: lost updates, phantom reads, and Pessimistic Locking with SELECT FOR UPDATE

  • OWASP API Security Top 10: Broken Object Level Authorization (BOLA/IDOR) and automated defensive scoping

  • Broken Function Level Authorization (BFLA) and Mass Assignment prevention using strict DTO allowlists

  • GraphQL Attack Vectors: query batching brute-force attacks, circular recursion, and server hardening

  • OAuth 2.0 & OIDC: Authorization Code Flow with PKCE for public clients versus Client Credentials for M2M

  • JWT vs Opaque Tokens: stateless verification, payload overhead, and hybrid Redis revocation architectures

  • Cross-Site Request Forgery (CSRF): why Authorization: Bearer headers are immune and SameSite cookie defenses

  • Clock Drift in Distributed Systems: timestamp synchronization, NTP daemon tuning, and skew tolerance windows

  • Offline-First Mobile Architecture: local-first persistence, Delta Sync, and Conflict-Free Replicated Data Types (CRDTs)

  • Streaming Large JSON Payloads: DOM parser memory traps versus event-driven streaming parsers (JSONStream)

  • Handling Webhook Failures: immediate ingress acknowledgment, poison pill isolation, and Dead-Letter Queues (DLQ)

  • Graceful API Shutdown in Kubernetes: the SIGTERM race condition, preStop hook delays, and connection draining

  • Serverless & Edge APIs: V8 Isolates vs MicroVM cold starts, ephemeral database connection limits, and edge state

Module 5: Behavioral & Situational Leadership (Lectures 91-101)

Master the STAR method (Situation, Task, Action, Result) for senior behavioral and architecture rounds:

  • Resolving a heated engineering debate between adopting GraphQL versus maintaining REST using objective POC data

  • Diagnosing and mitigating a critical production API outage caused by an unbatched GraphQL N+1 query storm

  • Leading an enterprise API breaking change migration without breaking third-party mobile applications in the wild

  • Designing an enterprise API from scratch under highly ambiguous requirements and tight 4-week deadlines

  • Negotiating with product stakeholders when feature demands compromise API scalability, memory, or security

  • Sunsetting a 5-year-old legacy API consumed by external partners using RFC 8594 headers and controlled brownouts

  • Leading an emergency security incident post-mortem after an API secret key was accidentally leaked

  • Mentoring junior engineers on RESTful standards, error handling, and clean code review practices

  • Balancing urgent business feature demands against refactoring critical API technical debt

  • Establishing and defending API Service Level Agreements (SLAs), SLOs, and formal Error Budget policies

  • Driving the cross-functional organizational adoption of Schema-First API development across distributed teams

Who this course is for:

  • Aspiring JavaScript and TypeScript developers, computer science students, fresh graduates, frontend and backend developers, and junior to intermediate full-stack engineers preparing for technical interviews. Ideal for learners who want to strengthen their conceptual understanding, revise frequently asked interview questions, and communicate technical answers confidently without hands-on coding exercises.