api

Practical resources about api for software engineers.

99 results

Building Robust APIs

APIs are the contract between systems. Whether you are exposing a public REST endpoint, designing an internal GraphQL schema, or integrating with a third-party service, the patterns you choose determine reliability, performance, and developer experience.

Here you will find recipes for handling CORS, implementing pagination, versioning endpoints, managing rate limits, and documenting APIs with OpenAPI. Each example includes runnable code in multiple languages so you can adapt it to your stack immediately.

intermediate

Backends for Frontends: Dedicated Backend per Client Type

How to create dedicated backends per client type. Covers BFF for web, mobile, and desktop. Covers...

intermediate

Gateway Routing Pattern

Route requests to multiple backend services through a single entry point that handles cross-cutting...

beginner

Adapter Pattern for Integrating External REST APIs

Use the Adapter pattern to normalize responses from external REST APIs into a consistent internal...

intermediate

Backend for Frontend (BFF) Pattern

Create dedicated backend services tailored to the specific needs of each frontend client type,...

intermediate

Chain of Responsibility for Request Processing Middleware

Pass requests along a chain of handlers where each handler decides whether to process the request...

intermediate

Decorator Pattern for HTTP Request Pipelines

Use the Decorator pattern to compose cross-cutting concerns like logging, metrics, and retries into...

intermediate

GraphQL Batched Resolver Pattern

Resolve nested GraphQL fields in a single batched request to eliminate N+1 queries and reduce...

intermediate

GraphQL DataLoader Pattern

Coalesce individual load requests into batched calls with per-request caching to prevent N+1...

intermediate

GraphQL Error Extension Pattern

Attach structured metadata to GraphQL errors using extension codes for predictable client-side...

advanced

GraphQL Interface Polymorphism Pattern

Model polymorphic types with GraphQL interfaces to share field contracts across different object...

advanced

GraphQL Schema Stitching Pattern

Merge multiple independent GraphQL schemas into a single unified schema that clients can query as...

intermediate

Token Bucket Rate Limiter: Smooth Traffic with Token Buckets

How to implement token bucket rate limiting for API protection. Covers bucket refill, burst...

beginner

API Changelog Template

A template for documenting API changes including breaking changes, new features, deprecations, and...

beginner

API Deprecation Notice Template

A template for communicating API deprecations, breaking changes, and sunset timelines to consumers.

beginner

API Error Handling Guideline

A guideline for standardizing error responses, status codes, and error payloads across REST and...

intermediate

API Rate Limiting Policy Template

A template for defining API rate limits per consumer tier, including burst allowances, quota...

intermediate

SLA Definition Template

A template for defining and documenting Service Level Agreements including uptime targets, response...

beginner

API Documentation Template

A reusable template for documenting REST and GraphQL APIs with endpoints, schemas, errors, and...

intermediate

API Error Response Template

A reusable template for consistent, informative, and developer-friendly API error responses that...

beginner

API Status Page Template

A template for a public API status page that communicates uptime, incidents, and maintenance...

No results found.