Prompt
What's the modern GraphQL stack?
Latest observation
A “modern GraphQL stack” usually means the current best-practice setup for building and running GraphQL APIs, plus the client tooling around them. A common stack looks like this:
1) Schema design
- GraphQL SDL for the schema
- Schema-first or code-first approach
- Use interfaces, unions, input types, custom scalars where needed
- Often split into:
- Public API schema
- Internal service schemas or subgraphs
2) Server/runtime
Popular choices:
- Apollo Server — still common, especially in Apollo ecosystem
- GraphQL Yoga — modern, lightweight, built on Envelop
- Mercurius — Fastify-based
- Helix / Envelop — lower-level, plugin-oriented tooling
Typical runtime pieces:
- Node.js / TypeScript
- Express, Fastify, or NestJS
- DataLoader for batching and avoiding N+1
- Context for auth, tracing, request-scoped data
3) Data layer
Usually one of:
- REST backends
- SQL databases via ORM/query builder:
- Prisma
- Drizzle
- TypeORM
- Knex
- NoSQL / third-party APIs
- Federation / service composition if multiple teams/services own parts of the graph
4) API architecture
Two common patterns:
- Monolith GraphQL API: one schema, one server
- Federated GraphQL:
- Apollo Federation is the most common
- Multiple subgraphs compose into one gateway/supergraph
Alternative modern pattern:
- GraphQL as BFF (Backend-for-Frontend), with GraphQL serving frontend-specific needs over existing services
5) Client stack
Most common client tools:
- Apollo Client — full-featured, still widely used
- Relay — strong for large apps and strict GraphQL discipline
- urql — lightweight and flexible
- TanStack Query + GraphQL codegen — increasingly common when teams want less client-specific abstraction
For React:
- Apollo Client / urql / Relay
- Next.js is very common as the app framework
6) Type safety and generated code
This is a big part of “modern” GraphQL:
- GraphQL Code Generator for:
- typed queries/mutations/subscriptions
- hooks for React
- schema types
- TypeScript end-to-end
- Often paired with:
- typed document nodes
- persisted queries
- fragment masking / fragment colocation
7) Caching and performance
Modern GraphQL usually includes:
- Client cache: Apollo normalized cache, Relay store, or urql exchanges
- Server caching:
- response caching
- Redis
- CDN caching where possible
- Persisted queries
- Query complexity / depth limits
- Pagination conventions:
- Relay-style cursor pagination is common
8) Auth and security
- JWT/session-based auth in request context
- Field-level authorization
- Rate limiting
- Persisted queries / allowlists
- Depth/complexity limits
- Input validation
9) Observability and operations
Modern stacks usually add:
- Tracing: OpenTelemetry
- Logging: structured logs
- Metrics: Prometheus/Grafana or cloud equivalents
- GraphQL-specific tooling:
- Apollo Studio / Hive / GraphOS
- schema registry
- operation analytics
- schema checks
10) Federation / supergraph tooling
If you’re in a larger org:
- Apollo Federation
- GraphOS
- Schema registry
- Composition checks in CI
- Contract testing between subgraphs and clients
A very common “modern” combo today
Backend
- Node.js + TypeScript
- GraphQL Yoga or Apollo Server
- Prisma or Drizzle
- PostgreSQL
- DataLoader
- OpenTelemetry
- GraphQL Code Generator
Frontend
- Next.js + React
- Apollo Client or urql
- GraphQL Code Generator
- Persisted queries
- TypeScript
Platform
- Docker
- Kubernetes or serverless, depending on scale
- Redis for caching
- Prometheus/Grafana + logs
- Apollo Federation / GraphOS if multi-team
If you want the “best current default”
For a new project, a strong default is:
- Next.js + React + TypeScript
- GraphQL Code Generator
- GraphQL Yoga or Apollo Server
- PostgreSQL + Prisma
- Apollo Client or urql
- DataLoader
- OpenTelemetry
- Optional: Apollo Federation if you expect multiple backend services
If you want, I can also give you:
- a 2025 GraphQL stack by use case (startup, enterprise, SaaS, mobile), or
- a reference architecture diagram for a modern GraphQL app.
Observation history
See 1 earlier observation
Create a free Obsurfable account to unlock historical responses, model comparisons, and deeper brand intelligence.
How did Obsurfable measure this prompt?
Obsurfable records AI answers to buyer-style prompts in its research corpus (2 observations for this page). Metrics are distributions over observations, not a single static ranking.
Which AI systems does Obsurfable collect answers from?
OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, and Meta AI.