React Apollo is a React-specific GraphQL data fetching library that binds Apollo Client to components through declarative hooks for queries, mutations, and subscriptions. It provides a declarative approach to GraphQL query execution where components declare their data requirements and automatically receive loading, error, and data states without managing request lifecycle code.
The library distinguishes itself through a normalized cache layer that deduplicates entities and serves repeated requests without network calls, combined with incremental result streaming via the @defer directive for partial query field delivery. It supports persisted operations safelisting for security, where approved queries are registered with the server so only pre-authorized operations are accepted. A fine-grained network status enumeration exposes distinct states for loading, refetching, polling, and pagination, enabling precise UI feedback.
The library offers provider-based client injection through a context provider at the component tree root, making the GraphQL client accessible to all descendant hooks. It includes configurable caching strategies with cache-first and network-only fetch policies, conditional query skipping using a type-safe token, and support for real-time subscriptions that push live data from the server without polling. Polling and refetch mechanisms allow queries to be re-executed at intervals or on demand, with partial error handling that can either discard all data on error or keep partial results when some fields fail.