• Solutions
  • Ecosystem
  • Blog
  • Our Services
  • About Us
  • Contact Us

Angular

A fully-featured GraphQL client for Angular

v3 (latest)v3 (latest)v2v2v1v1GitHubGitHub (opens in a new tab)
  • Introduction
  • Get Started
  • Fetching
    • Queries
    • Mutations
    • Subscriptions
    • Query, Mutation, Subscription Services
    • Network Layer
    • Pagination
    • Using Fragments
    • Error Handling
  • Caching
    • Configuration
    • Reading and Writing
    • Garbage Collection
    • Customizing Field Behavior
    • Advanced Topics
  • Local State
    • Managing Local State
    • Managing State with Field Policies
    • Reactive Variables
  • Development and Testing
    • TypeScript
    • Testing
    • Mocking New Schema Capabilities
    • Developer Tools
  • Performance
    • Improving Performance
    • Optimistic UI
    • Server Side Rendering
  • Recipes
    • Simple Example
    • Automatic Persisted Queries
    • Angular CLI
    • Webpack Loader
    • Authentication
    • Multiple Clients
    • Integrating with NativeScript
  • Migration Guide
  • v3 (latest)
    • Introduction
    • Get Started
    • Fetching
      • Queries
      • Mutations
      • Subscriptions
      • Query, Mutation, Subscription Services
      • Network Layer
      • Pagination
      • Using Fragments
      • Error Handling
    • Caching
      • Configuration
      • Reading and Writing
      • Garbage Collection
      • Customizing Field Behavior
      • Advanced Topics
    • Local State
      • Managing Local State
      • Managing State with Field Policies
      • Reactive Variables
    • Development and Testing
      • TypeScript
      • Testing
      • Mocking New Schema Capabilities
      • Developer Tools
    • Performance
      • Improving Performance
      • Optimistic UI
      • Server Side Rendering
    • Recipes
      • Simple Example
      • Automatic Persisted Queries
      • Angular CLI
      • Webpack Loader
      • Authentication
      • Multiple Clients
      • Integrating with NativeScript
    • Migration Guide
  • v2
    • Introduction
    • Getting Started
    • Fetching
      • Queries
      • Mutations
      • Subscriptions
      • Query, Mutation, Subscription Services
      • Network Layer
      • Pagination
      • Using Fragments
      • Error Handling
    • Caching
      • Configuring the Cache
      • Reading and Writing Data to the Cache
      • Garbage Collection and Cache Eviction
      • Customizing the Behavior of Cached Fields
      • Advanced Topics on Caching
    • Local State
      • Managing Local State
      • Managing State with Field Policies
      • Reactive Variables
    • Development and Testing
      • TypeScript
      • Testing
      • Mocking New Schema Capabilities
      • Developer Tools
    • Performance
      • Improving Performance
      • Optimistic UI
      • Server Side Rendering
    • Recipes
      • Simple Example
      • Automatic Persisted Queries
      • Angular CLI
      • Webpack Loader
      • Authentication
      • Multiple Clients
      • Integrating with NativeScript
    • Migration Guide
  • v1
    • Introduction
    • Migration Guide
    • Basics
      • Setup and Options
      • Queries
      • Mutations
      • Query, Mutation, Subscription Services
      • Network layer (Apollo Link)
      • Apollo Cache
      • Local State Management
    • Features
      • Error Handling
      • Direct Cache Access
      • Optimistic UI
      • Updating the Store
      • Using Fragments
      • Subscriptions
      • Integrating with NativeScript
      • Multiple Clients
      • Static Typing
    • Guides
      • State Management
      • Testing Apollo in Angular
      • Tools and Packages
    • Recipes
      • Small Example
      • Query Splitting
      • Pagination
      • Authentication
      • Prefetching Data
      • Server Side Rendering
      • Webpack Loader
      • Meteor
      • Angular CLI
      • Apollo Angular Boost migration
Question? Give us feedback → (opens in a new tab)Edit this page on GitHub
v3 (latest)
Caching
Reading and Writing

Reading and Writing Data to the Cache

Apollo Client provides three methods for reading and writing data to the cache:

  • readQuery and readFragment
  • writeQuery and writeFragment
  • cache.modify (a method of InMemoryCache)

Please read the "Reading and writing data to the cache" (opens in a new tab) chapter on Apollo Client documentation.

ConfigurationGarbage Collection

PRODUCTS

  • Hive
  • Conductor
  • Yoga
  • Envelop
  • Stitching
  • Inspector
  • Code Generator
  • Mesh
  • Tools
  • Modules
  • ESLint
  • Config
  • Scalars
  • Helix
  • Shield
  • SOFA
  • Angular
  • WhatsApp
  • KitQL

RESOURCES

  • Press Kit

COMPANY

  • About
  • Blog
  • Newsletter
  • Open Source
  • Services
  • GitHub

COMMUNITY

  • Twitter
  • LinkedIn
  • Discord
  • Medium
  • YouTube
Cloud Security Alliance Star Level One Badge