CHAPTER 12

API Design, Contracts & Frameworks

Every subchapter in this chapter, free to read online. Work through them in order, or jump straight to the runtime detail you need.

12
chapter
7
subchapters
Free
online
01
Subchapter

Resource Modeling & REST

Model REST-style API resources, route patterns, representations, methods, status signals, and client contracts for Node HTTP services.

02
Subchapter

OpenAPI & JSON Schema

Connect OpenAPI documents, JSON Schema, generated clients, runtime validation, coercion, response schemas, and contract drift in Node API services.

03
Subchapter

Express & Fastify Internals

Trace Express and Fastify requests through routing, middleware, hooks, validation, serialization, handler execution, and framework error flow.

04
Subchapter

Errors, Idempotency & Pagination

Define client-visible API behavior for errors, repeated writes, paginated reads, filters, sorting, and field projection.

05
Subchapter

GraphQL Schemas & Resolvers

How GraphQL schemas, selection sets, resolvers, N+1 behavior, DataLoader, persisted queries, and GraphQL over HTTP work in Node services.

06
Subchapter

gRPC & Protocol Buffers

How gRPC uses Protocol Buffers, generated stubs, HTTP/2 streams, metadata, trailers, deadlines, and field-number discipline to build typed Node service contracts.

07
Subchapter

Versioning & Gateways

How API contracts change over time, how to classify compatibility risk, and where gateways fit in version routing, migration, and contract enforcement boundaries.

Other chapters

13 more