API Design, Contracts & Frameworks

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

Start with the first topic12.1 Resource Modeling & REST
12chapter
7topics
Freeonline

Topics

7 topics

Resource Modeling & REST

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

OpenAPI & JSON Schema

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

Express & Fastify Internals

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

Errors, Idempotency & Pagination

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

GraphQL Schemas & Resolvers

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

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.

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.