Apollo Client

Industry-leading GraphQL client with normalized caching for TypeScript and React

Library
npm
v4.2.12
19,807stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
95/100Excellent
Development Activity100
Maintenance96
Community84
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
83/100Excellent
Architecture90
Code Quality90
Innovation85
Learning Curve68

Apollo Client is a comprehensive GraphQL client for TypeScript, JavaScript, React, Vue, Angular, and other frameworks, providing everything an application needs to fetch, cache, and update data from a GraphQL API. Its centerpiece is a normalized, in-memory cache that automatically keeps every query and mutation result consistent — updating any component observing affected data as soon as a mutation or subscription changes it, without manual cache-busting.

Beyond data fetching, Apollo Client bundles a link-based network layer (for batching, retries, auth, and error handling), optimistic UI helpers, local-state management, and official React hooks (useQuery, useMutation, useSubscription) that integrate cache state directly into component render cycles. It’s maintained by Apollo GraphQL and is one of the two dominant GraphQL client choices (alongside Relay) for production JavaScript applications.

What You Get

  • A normalized in-memory cache (InMemoryCache) that deduplicates and keeps entities consistent across every query/mutation
  • React hooks (useQuery, useMutation, useSubscription, useLazyQuery) with built-in loading/error state
  • A composable ApolloLink network layer for auth headers, batching, retries, and error handling
  • Optimistic UI updates and automatic cache updates after mutations
  • Local-state management for combining client-only state with remote GraphQL data in the same cache
  • Official bindings/adapters beyond React, plus first-class TypeScript types generated from your schema

Common Use Cases

  • Fetching and caching data from a GraphQL API in a React (or Vue/Angular) single-page application
  • Building optimistic UI flows where mutations update the interface instantly before server confirmation
  • Keeping multiple components in sync automatically when shared data changes via mutations or subscriptions
  • Combining local client-only state (UI flags, drafts) with server data through the same query/cache layer

Under The Hood

Architecture The client is organized around src/core/ (including QueryManager.ts at ~1,840 lines, the central orchestrator that tracks in-flight queries, deduplicates requests, and notifies observers of cache changes) and src/cache/inmemory/inMemoryCache.ts (~610 lines), which implements the normalized cache using object identity fields (id/__typename by default, or custom keyFields) to store every entity once regardless of how many queries touched it. src/link/ implements the Apollo Link architecture — a chain-of-responsibility pattern where each link (HTTP, retry, error, auth) can inspect or transform the operation before passing it to the next link, terminating in an HTTP link that performs the actual network request. src/react/ layers hooks and context providers on top of this core, subscribing components to cache changes so useQuery results update reactively, while src/local-state/ and src/masking/ implement client-only fields and fragment data masking respectively. Tech Stack TypeScript, published as @apollo/client (a scoped package superseding the legacy unscoped apollo-client), with graphql as a peer dependency and Zen Observable/RxJS-adjacent observables internally for the subscription/link pipeline; the monorepo uses a private root package with per-target build outputs (CJS, ESM) under dist/. Code Quality Test coverage is extensive with 136+ .test.ts files under src/, covering the cache, query manager, links, and React hooks individually, backed by CI (CircleCI badge in the README) and a documented issue triage/community process (Discourse community link). API Design The hook-based API (useQuery(GET_ITEMS)) is deliberately close to native GraphQL syntax and requires minimal boilerplate to get a query rendering with loading/error handling, though correctly configuring cache normalization (keyFields, type policies) for complex schemas is where the learning curve rises.

Used by 13 apps in this directory

TypeScript
96%
Other

Amplication

Developer Tools · AI Code Assistants · Automation

16,010

Create production-ready backend services with your organization's standards baked in — generating NestJS, Prisma, and GraphQL code that you own and control.

View details
61
Repo Health
84
Technical
60
Dependency
Built with
TypeScript96%
Updated 1 months ago
Go
55%
Apache 2.0

Authgear

Authentication

1,989

Open-source, self-hostable authentication platform with passkeys, biometric login, SSO, MFA, and GraphQL admin API — a full Auth0/Clerk/Firebase alternative for SaaS and mobile apps.

View details
88
Repo Health
81
Technical
72
Dependency
Built with
Go55%
HTML26%
TypeScript17%
Updated yesterday
Ruby
67%
Other

GitLab

Devops · Developer Tools

24,533

The complete DevOps platform that unifies Git hosting, CI/CD, issue tracking, and security scanning into a single self-hostable application.

View details
87
Repo Health
86
Technical
70
Dependency
Built with
Ruby67%
JavaScript20%
Updated today
TypeScript
95%
AGPL 3.0

HeyForm

Forms Surveys · No Code Platforms

8,938

Open-source conversational form builder with AI generation, conditional logic, and 30+ integrations — self-host with full data ownership.

View details
86
Repo Health
67
Technical
69
Dependency
Built with
TypeScript95%
Updated today
TypeScript
71%
Other

highlight.io

Developer Tools · Analytics · Monitoring

9,367

Open-source full-stack monitoring that unifies session replay, error tracking, logging, and distributed tracing so you can stop context-switching between tools.

View details
69
Repo Health
78
Technical
66
Dependency
Built with
TypeScript71%
Go16%
Updated yesterday
TypeScript
99%
MIT

KeystoneJS

CMS · Developer Tools

9,957

The superpowered headless CMS for developers built with GraphQL and React

View details
91
Repo Health
81
Technical
64
Dependency
Built with
TypeScript99%
Updated yesterday
Python
58%
Apache 2.0

MLflow

AI Development · Monitoring

27,573

The open source AI engineering platform for debugging, evaluating, monitoring, and optimizing production LLMs and agents at scale.

View details
97
Repo Health
86
Technical
68
Dependency
Built with
Python58%
TypeScript33%
Updated today
JavaScript
98%
Apache 2.0

Parse Server

Developer Tools · Databases

21,409

Self-hosted Backend-as-a-Service for Node.js with REST, GraphQL, real-time Live Query, cloud code, and pluggable adapters for any infrastructure.

View details
96
Repo Health
81
Technical
78
Dependency
Built with
JavaScript98%
Updated 1 weeks ago
TypeScript
96%
MIT

Payload CMS

Developer Tools · Blogging · CMS

44,258

The open-source, Next.js-native headless CMS that lives inside your /app folder and gives you a full TypeScript backend instantly.

View details
92
Repo Health
88
Technical
67
Dependency
Built with
TypeScript96%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search