graphql
Practical resources about graphql for software engineers.
28 results
Designing Flexible APIs with GraphQL
GraphQL shifts the power balance from server to client, allowing consumers to request exactly the data they need. But with flexibility comes complexity: N+1 queries, schema evolution, and resolver performance require careful design.
Explore recipes for writing resolvers, implementing federation, handling subscriptions, and managing schema versioning. Each pattern includes performance considerations and security best practices specific to GraphQL implementations.
Custom GraphQL Scalar Types for Dates, Emails, and JSON
Define custom GraphQL scalars for Date, Email, URL, and JSON fields with serialization, parsing,...
Batch and Cache Database Queries with GraphQL DataLoader
Use DataLoader to coalesce individual load requests into batched database calls, solving the N+1...
Field-Level Auth with Custom GraphQL Schema Directives
Implement field-level authorization in GraphQL using custom schema directives that check user roles...
Structured GraphQL Errors with Extension Codes
Implement structured error handling in GraphQL with custom error classes, extension codes, and...
Set Up a GraphQL Federation Gateway with Apollo
Compose multiple GraphQL services into a single federated supergraph using Apollo Federation and a...
Validate and Sanitize GraphQL Input Types Server-Side
Implement centralized input validation in GraphQL using custom validation functions, Zod schemas,...
Mock GraphQL Resolvers for Frontend Development
Set up mocked GraphQL resolvers with Apollo Server so frontend teams can develop against a fake API...
Detect and Fix N+1 Queries in GraphQL Resolvers
Identify N+1 query problems in GraphQL resolvers using logging, DataLoader, and query analysis...
Cursor-based Pagination with GraphQL Relay Connections
Implement Relay-style cursor pagination in GraphQL with edges, nodes, and pageInfo for efficient...
Real-Time Data with GraphQL WebSocket Subscriptions
Implement GraphQL subscriptions over WebSockets with Apollo Server and PubSub for real-time updates...
GraphQL Batched Resolver Pattern
Resolve nested GraphQL fields in a single batched request to eliminate N+1 queries and reduce...
GraphQL Connection Pagination Pattern
Implement Relay-style cursor-based pagination with edges, nodes, and pageInfo for stable GraphQL...
GraphQL DataLoader Pattern
Coalesce individual load requests into batched calls with per-request caching to prevent N+1...
GraphQL Error Extension Pattern
Attach structured metadata to GraphQL errors using extension codes for predictable client-side...
GraphQL Federated Entity Pattern
Learn the GraphQL federated entity pattern with Apollo Federation. Share entity types across...
GraphQL Interface Polymorphism Pattern
Model polymorphic types with GraphQL interfaces to share field contracts across different object...
GraphQL Mutation Validation Pattern
Centralize input validation for GraphQL mutations using custom validators, schema directives, and...
GraphQL Schema Stitching Pattern
Merge multiple independent GraphQL schemas into a single unified schema that clients can query as...
GraphQL API Design Guidelines
GraphQL API design guidelines with schema structure, naming, mutations, pagination, auth, rate...
GraphQL Deprecation Policy Template
Policy template for deprecating GraphQL fields, types, arguments, and enum values safely. Includes...
No results found.