# apollo-client - Doramagic AI Context Pack

> Positioning: a pre-install experience and judgment asset. It helps the host AI get off to a good start, but it does not mean the project has already been installed, run, or validated.

## Sufficiency Principle

- **Sufficiency over compression**: The AI Context Pack should be sufficient for the host AI to understand the project's value, capability boundaries, entrypoints, risks, and evidence sources before starting work; it may be layered, but it does not aim for the shortest possible summary.
- **Compression policy**: Compress only noise and duplication, never context that affects judgment or the quality of the work.

## How the Host AI Should Use This

You are reading the AI Context Pack that Doramagic compiled for apollo-client. Treat it as pre-work context: help the user understand who it fits, what it can do, how to start, what must be verified after install, and where the risks are. Do not claim that you have already installed, run, or executed the target project.

## Claim Consumption Rules

- **Fact source**: Repo Evidence + Claim/Evidence Graph; the Human Wiki only supplies salience, terminology, and narrative structure.
- **Minimum status for a fact**: `supported`
- `supported`: May be used as a project fact, but the answer must cite the claim_id and evidence path.
- `weak`: Usable only as a low-confidence lead; the user must be asked to keep verifying.
- `inferred`: Usable only for risk notes or open questions; must not be packaged as a project fact.
- `unverified`: Must not be used as fact; state clearly that evidence is insufficient.
- `contradicted`: Must show the conflicting sources and must not force a single version on the user's behalf.

## Who It Fits Best

- **Users who want to bring professional workflows into a host AI**: The repo contains Skill documents. Evidence: `docs/agent-skills/apollo-client/SKILL.md` Claim: `clm_0003` supported 0.86

## What It Can Do

- **AI Skill / Agent Instruction Asset Library** (Previewable before install): The project contains Skill or Agent instruction files that a host AI can read, useful for bringing professional workflows into hosts like Claude, Codex, or Cursor. Evidence: `docs/agent-skills/apollo-client/SKILL.md` Claim: `clm_0001` supported 0.86
- **Command-Line Startup or Install Flow** (Verify after install): The project documentation contains runnable commands; real use requires running them in a local or host environment. Evidence: `README.md` Claim: `clm_0002` supported 0.86

## How to Start

- `npm install @apollo/client graphql` Evidence: `README.md` Claim: `clm_0004` supported 0.86
- `npx skills add apollographql/skills --skill apollo-client` Evidence: `README.md` Claim: `clm_0005` supported 0.86

## Continue-or-Stop Decision Card

- **Current recommendation**: Sandbox trial only
- **Why**: The project has signals of install commands, host configuration, or local writes; do not go straight into your primary environment—trial it in isolation first.

### 30-Second Read

- **What to do now**: Sandbox trial only
- **Minimum safe next step**: Run Prompt Preview first; if you still want to install, trial only in an isolated environment
- **Do not trust yet**: Real output quality cannot be trusted before install.
- **Continuing will touch**: Command execution, Host AI configuration, Local environment or project files

### What You Can Trust Now

- **Target-audience signal: Users who want to bring professional workflows into a host AI** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `docs/agent-skills/apollo-client/SKILL.md` Claim: `clm_0003` supported 0.86
- **Capability exists: AI Skill / Agent Instruction Asset Library** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `docs/agent-skills/apollo-client/SKILL.md` Claim: `clm_0001` supported 0.86
- **Capability exists: Command-Line Startup or Install Flow** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `README.md` Claim: `clm_0002` supported 0.86
- **There are Quick Start / install-command signals** (supported): You can trust that the docs mention a startup or install entrypoint; do not run it directly in your primary environment because of that. Evidence: `README.md` Claim: `clm_0004` supported 0.86

### What You Cannot Trust Yet

- **Real output quality cannot be trusted before install.** (unverified): Prompt Preview can only show how it guides you; it cannot prove result quality in the real project.
- **Host AI version compatibility cannot be trusted before install.** (unverified): Host loading rules and version differences across Claude, Cursor, Codex, Gemini, and others must be verified in a real environment.
- **That it will not pollute your existing host AI's behavior cannot be trusted directly.** (inferred): Skill, plugin, and AGENTS/CLAUDE/GEMINI instructions may change the host AI's default behavior. Evidence: `CLAUDE.md`, `docs/agent-skills/apollo-client/SKILL.md`
- **Safe rollback cannot be assumed by default.** (unverified): Unless the project clearly provides uninstall and recovery instructions, verify in an isolated environment first.
- **After a real install, is it compatible with the user's current host AI version?** (unverified): Compatibility can only be verified in the actual host environment.
- **Does the project's output quality meet the user's specific task?** (unverified): The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **Do the install commands require network access, permissions, or global writes?** (unverified): This affects install risk in both enterprise and personal environments. Evidence: `README.md`

### What Continuing Will Touch

- **Command execution**: Package managers, network downloads, the local plugin directory, project config, or the user's home directory. Why: Running the very first command can already change your environment; decide whether it is worth running first. Evidence: `README.md`
- **Host AI configuration**: The plugin, Skill, or rule-loading config of hosts like Claude/Codex/Cursor/Gemini/OpenCode. Why: Host configuration changes how the AI works afterward and may conflict with the user's existing rules. Evidence: `CLAUDE.md`, `docs/agent-skills/apollo-client/SKILL.md`
- **Local environment or project files**: Install results, plugin caches, project config, or local dependency directories. Why: The write scope and rollback path cannot be proven before install and need isolated verification. Evidence: `README.md`
- **Host AI context**: The AI Context Pack, Prompt Preview, Skill routing, risk rules, and project facts. Why: Importing context affects the host AI's later judgment, so avoid packaging unverified items as facts.

### Minimum Safe Next Steps

- **Run Prompt Preview first**: Use a pre-install interactive trial to judge whether the way of working fits; it needs no authorization or environment change. (applies when: Applies to any project, especially when output quality is unknown.)
- **Trial-install only in an isolated directory or a test account**: Avoid letting install commands pollute your primary host AI, real projects, or home directory. (applies when: When there are signals of command execution, plugin config, or local writes.)
- **Back up your host AI configuration first**: Skill, plugin, and rule files may change the default behavior of Claude/Cursor/Codex. (applies when: When there is a plugin manifest, a Skill, or a host rule entrypoint.)
- **After install, verify just one minimal task**: Verify loading, compatibility, output quality, and rollback first, then decide whether to use it deeply. (applies when: When moving from a trial into a real workflow.)

### Exit Plan

- **Preserve the pre-install state**: Record the original host config and project state so you can later judge whether it is recoverable.
- **Be ready to remove the host plugin / Skill / rule entrypoint**: If behavior is off after the trial install, you can restore the host AI to its pre-trial state.
- **Record the install commands and written paths**: Without clear uninstall instructions, you at least need to know which directories or configs to clean up manually.
- **If there is no rollback path, do not enter your primary environment**: No rollback is a blocker before continuing; do not proceed on trust or luck.

## What Can Only Be Previewed

- Explain who the project fits and what it can do
- Demonstrate a typical conversation flow based on project docs
- Help the user decide whether it is worth installing or researching further

## What Must Be Verified After Install

- Actually installing the Skill, plugin, or CLI
- Running scripts, modifying local files, or accessing external services
- Verifying real output quality, performance, and compatibility

## Boundary & Risk Decision Card

- **Mistaking the pre-install preview for a real run**: The user may overestimate how much configuration, permission, and compatibility verification the project has already done. Mitigation: Clearly separate prompt_preview_can_do from runtime_required. Claim: `clm_0006` inferred 0.45
- **Command execution will modify the local environment**: Install commands may write to the user's home directory, the host plugin directory, or project configuration. Mitigation: Run in an isolated environment or a test account first. Evidence: `README.md` Claim: `clm_0007` supported 0.86
- **To confirm**: After a real install, is it compatible with the user's current host AI version?. Why: Compatibility can only be verified in the actual host environment.
- **To confirm**: Does the project's output quality meet the user's specific task?. Why: The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **To confirm**: Do the install commands require network access, permissions, or global writes?. Why: This affects install risk in both enterprise and personal environments.

## Pre-Work Working Context

### Loading Order

- First read how_to_use.host_ai_instruction to establish the boundaries of this pre-install judgment asset.
- Read claim_graph_summary to confirm facts come from the Claim/Evidence Graph, not the Human Wiki narrative.
- Then read intended_users, capabilities, and quick_start_candidates to judge whether the user is a match.
- When you need to carry out a concrete task, check role_skill_index first, then evidence_index.
- For real install, file modification, network access, performance, or compatibility questions, turn to risk_card and boundaries.runtime_required.

### Task Routes

- **AI Skill / Agent Instruction Asset Library**: Use role_skill_index / evidence_index to help the user pick a usable role, Skill, or workflow first. Boundary: Can be experienced via a pre-install Prompt. Evidence: `docs/agent-skills/apollo-client/SKILL.md` Claim: `clm_0001` supported 0.86
- **Command-Line Startup or Install Flow**: State that this is an after-install capability first, then give a pre-install checklist. Boundary: Must be verified after a real install or run. Evidence: `README.md` Claim: `clm_0002` supported 0.86

### Context Scale

- Total files: 988
- Important-file coverage: 40/988
- Evidence index entries: 77
- Role / Skill entries: 1

### Handling Insufficient Evidence

- **missing_evidence**: State that evidence is insufficient and ask the user for the target file, a README section, or after-install verification records; do not fill in facts.
- **out_of_scope_request**: State that the task is beyond the current AI Context Pack's evidence scope and suggest the user check the Human Manual or verify after a real install.
- **runtime_request**: Provide a pre-install checklist and command sources, but do not run commands for the user or claim they have been run.
- **source_conflict**: Show the conflicting sources side by side, mark them as unverified, and do not force a single version.

## Prompt Recipes

### Fit assessment

- Goal: Judge whether this project fits the user's current task.
- Expected output: A fit conclusion, key reasons, evidence citations, what can be previewed before install, what must be verified after install, and a next-step recommendation.

```text
Based on the AI Context Pack for apollo-client, ask me 3 necessary questions first, then judge whether it fits my task. The answer must cover: who it fits, what it can do, what it cannot do, whether it is worth installing, and where the evidence comes from. Every project fact must cite evidence_refs, source_paths, or a claim_id.
```

### Pre-install experience

- Goal: Let the user feel the core workflow before installing, while avoiding packaging the preview as real capability or a marketing promise.
- Expected output: An experience script with boundary labels, an after-install verification checklist, and a cautious recommendation; with no real-run promises or strong marketing language.

```text
Treat apollo-client as a pre-install experience asset, not an already-installed tool or a real runtime environment.

Output exactly four parts:
1. Ask me 3 necessary questions first.
2. Give an "experience script": use the three labels [Previewable before install], [Must verify after install], and [Insufficient evidence] to show how it might guide the workflow.
3. Give an after-install verification checklist: list which capabilities can only be confirmed after a real install, real host loading, and a real project run.
4. Give a cautious recommendation: only "worth researching/trialing further", "add information before deciding", or "not recommended to continue"; do not endorse the project.

Hard boundaries:
- Do not claim you have installed, run, executed tests, modified files, or produced real results.
- Do not write promise-like phrasing such as "auto-adapts", "guarantees passing", "perfect fit", or "strongly recommend installing".
- If you describe how it works after install, you must use a conditional such as "if installed successfully and the host loads the Skill correctly, it might...".
- The experience script may only be written as "example lines / hypothetical flow": use "might ask / might suggest / might show", not "has written, has generated, has passed, is running, is generating".
- Prompt Preview does not hand out install commands; if the user is ready to trial, only prompt them to read Quick Start and the Risk Card first and to verify in an isolated environment.
- Every project fact must come from a supported claim, evidence_refs, or source_paths; inferred/unverified items can only be risks or open questions.

```

### Role / Skill selection

- Goal: Pick the best-matching asset from the project's roles or Skills.
- Expected output: A list of candidate roles or Skills, each with an applicable scenario, evidence paths, risk boundary, and whether after-install verification is needed.

```text
Read role_skill_index and recommend 3-5 of the most relevant roles or Skills for my target task. For each recommendation, state the applicable scenario, likely output, risk boundary, and evidence_refs.
```

### Risk pre-check

- Goal: Identify environment, permission, rule-conflict, and quality risks before installing or adopting.
- Expected output: A checklist of environment, permission, dependency, license, host-conflict, quality risk, and unknown items.

```text
Based on risk_card, boundaries, and quick_start_candidates, give me a pre-install risk pre-check list. Do not run commands for me; only explain what I should check, why, and what impact a failure would have.
```

### Host AI kickoff instruction

- Goal: Turn the project context into a host AI instruction for the start of a conversation.
- Expected output: A pre-work instruction with clear boundaries and clear evidence citations, suitable to copy to a host AI.

```text
Based on the AI Context Pack for apollo-client, generate a pre-work instruction I can paste to my host AI. This instruction must obey not_runtime=true and must not claim the project has been installed, run, or produced real results.
```

## Role / Skill Index

- Indexed 1 role / Skill / project-doc entries.

- **apollo-client** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “apollo-client”, use it for a pre-install experience first, then decide whether to install. Evidence: `docs/agent-skills/apollo-client/SKILL.md`

## Evidence Index

- Indexed 77 evidence entries.

- **Documentation** (documentation): This is the documentation source for this repository. Evidence: `docs/README.md`
- **Changesets** (documentation): Hello and welcome! This folder has been automatically generated by @changesets/cli , a build tool that works with multi-package repos, or single-package repos to help you version and publish your code. You can find the full documentation for it in our repository https://github.com/changesets/changesets Evidence: `.changeset/README.md`
- **❓ Why Choose Apollo Client?** (documentation): The industry-leading GraphQL client for TypeScript, JavaScript, React, Vue, Angular, and more. Apollo Client delivers powerful caching, intuitive APIs, and comprehensive developer tools to accelerate your app development. Evidence: `README.md`
- **Migrating import s from Apollo Client 2.x to 3.x** (documentation): Migrating import s from Apollo Client 2.x to 3.x Evidence: `scripts/codemods/ac2-to-ac3/README.md`
- **Using this codemod** (documentation): You can run this codemod with the following command: Evidence: `scripts/codemods/ac3-to-ac4/README.md`
- **Memory and Garbage Collection tests** (documentation): Memory and Garbage Collection tests Evidence: `scripts/memory/README.md`
- **Package** (package_manifest): { "name": "@apollo/client-graphql-codegen", "version": "2.1.1", "description": "Apollo Client GraphQL Codegen Plugins", "keywords": "apollo", "client", "graphql", "codegen" , "author": "packages@apollographql.com", "license": "MIT", "type": "module", "sideEffects": false, "repository": { "type": "git", "url": "git+https://github.com/apollographql/apollo-client.git", "directory": "codegen" }, "bugs": { "url": "https://github.com/apollographql/apollo-client/issues" }, "homepage": "https://www.apollographql.com/docs/react/", "exports": { "./local-state": "./dist/local-state/index.js" }, "files": "dist" , "scripts": { "prebuild": "npm run clean", "clean": "rimraf dist", "build": "tsc", "prepack… Evidence: `codegen/package.json`
- **Package** (package_manifest): { "type": "module", "scripts": { "test": "node --no-warnings --test --watch .test.ts" } } Evidence: `eslint-local-rules/package.json`
- **Package** (package_manifest): { "name": "integration-tests", "license": "UNLICENSED", "pnpm": { "overrides": { "@playwright/test": "1.43.1", "playwright": "1.43.1", "serve": "^14.2.0", "@apollo/client": "link:../", "@apollo/client-graphql-codegen": "link:../codegen" } }, "devDependencies": { "@types/lodash": "^4.14.195", "playwright": "1.43.1" } } Evidence: `integration-tests/package.json`
- **Package** (package_manifest): { "name": "@apollo/client", "version": "4.2.6", "description": "A fully-featured caching GraphQL client.", "private": true, "keywords": "apollo", "graphql", "react", "hooks", "client", "cache", "tanstack-intent" , "author": "packages@apollographql.com", "license": "MIT", "type": "module", "main": "./dist/ cjs/core/index.cjs", "module": "./dist/core/index.js", "types": "./dist/core/index.d.ts", "sideEffects": false, "react-native": { "react-dom/server": false }, "repository": { "type": "git", "url": "git+https://github.com/apollographql/apollo-client.git" }, "bugs": { "url": "https://github.com/apollographql/apollo-client/issues" }, "homepage": "https://www.apollographql.com/docs/react/", "e… Evidence: `package.json`
- **Package** (package_manifest): { "name": "size-limit-apollo-plugin", "type": "module", "exports": { ".": "./index.js", "./package.json": "./package.json" } } Evidence: `config/size-limit/package.json`
- **Package** (package_manifest): { "name": "browser-esm", "scripts": { "serve-app": "yarn serve html", "test": "playwright test" }, "devDependencies": { "shared": "workspace:^", "playwright": " ", "@playwright/test": " ", "serve": " " } } Evidence: `integration-tests/browser-esm/package.json`
- **Package** (package_manifest): { "name": "codegen", "version": "1.0.0", "license": "MIT", "private": true, "type": "module", "scripts": { "codegen": "graphql-codegen --config ./codegen.ts" }, "dependencies": { "@apollo/client-graphql-codegen": "2.0.0", "@graphql-codegen/add": "^5.0.3", "@graphql-codegen/cli": "^5.0.6", "@graphql-codegen/plugin-helpers": "^6.0.0", "@graphql-codegen/typescript": "^5.0.4", "@graphql-codegen/visitor-plugin-common": "^6.0.0", "graphql": "^16.14.2", "prettier": "3.1.1", "typescript": "^5.8.3" }, "dependenciesMeta": { "@apollo/client-graphql-codegen": { "injected": true } } } Evidence: `integration-tests/codegen/package.json`
- **Package** (package_manifest): { "name": "cra5", "version": "0.1.0", "private": true, "dependencies": { "@apollo/client": "4.1.3", "@types/react": "^18.2.14", "@types/react-dom": "^18.2.6", "graphql": "^16.8.1", "react": "^18.3.0", "react-dom": "^18.3.0", "react-scripts": "5.0.1", "rxjs": "^7.8.2", "typescript": "^5.9.3" }, "scripts": { "start": "PORT=3000 react-scripts start", "build": "react-scripts build", "serve-app": "yarn serve -s build", "test": "playwright test" }, "browserslist": { "production": " 0.2%", "not dead", "not op mini all" , "development": "last 1 chrome version", "last 1 firefox version", "last 1 safari version" }, "devDependencies": { "@playwright/test": " ", "playwright": " ", "serve": " ", "shared… Evidence: `integration-tests/cra5/package.json`
- **Package** (package_manifest): { "name": "next", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "serve-app": "npm run start", "ci-preparations": "pnpm install @apollo/client-integration-nextjs@$ pnpm show @apollo/client-integration-nextjs version ", "test": "playwright test" }, "dependencies": { "@apollo/client": "4.1.3", "@apollo/client-integration-nextjs": "^0.12.0-alpha.1", "@graphql-tools/schema": "^10.0.0", "@types/node": "20.3.1", "@types/react": "18.2.14", "@types/react-dom": "18.2.6", "deepmerge": "^4.3.1", "graphql": "^16.8.1", "lodash": "^4.17.21", "next": "^15.2.1", "react": "^18.3.0", "react-dom": "^18.3.0", "rxjs": "^7.8.2", "ts-invariant":… Evidence: `integration-tests/next/package.json`
- **Package** (package_manifest): { "name": "node", "version": "1.0.0", "license": "MIT", "type": "module", "scripts": { "build": "echo Done", "test:cjs": "node --no-experimental-require-module --trace-require-module=all --test test-cjs.cjs", "test:require-esm": "node --test test-require-esm.cjs", "test:esm": "node --test test-esm.mjs" }, "dependencies": { "@apollo/client": "4.1.3", "react": "^18.3.0", "react-dom": "^18.3.0" }, "devDependencies": { "resolve-esm": "^1.4.0" } } Evidence: `integration-tests/node/package.json`
- **Package** (package_manifest): { "name": "peerdeps-tsc", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "tsc" }, "keywords": , "author": "", "license": "ISC", "dependencies": { "graphql": "^16.0.0", "graphql-ws": "^5.5.5", "@types/react": "^18.0.0", "@types/react-dom": "^18.0.0", "subscriptions-transport-ws": "^0.11.0", "typescript": "latest" } } Evidence: `integration-tests/peerdeps-tsc/package.json`
- **Package** (package_manifest): { "name": "shared", "license": "UNLICENSED", "peerDependencies": { "@playwright/test": " ", "@apollo/client": " " } } Evidence: `integration-tests/shared/package.json`
- **Package** (package_manifest): { "name": "type-tests", "private": true, "version": "0.0.0", "type": "module", "scripts": { "update-references": "cp tsconfig.json tsconfig.bak; find . -mindepth 2 -name tsconfig.json jq --raw-input --slurp --slurpfile tsconfig tsconfig.bak 'split \"\n\" . :-1 map {path:.} as $references .=$tsconfig 0 .references=$references .' tsconfig.json; rm tsconfig.bak", "test": "tsc --build" }, "dependencies": { "@apollo/client": "4.1.3", "expect-type": "^1.2.1", "graphql": "^16.8.1", "rxjs": "^7.8.2", "typescript": "^5.9.3" } } Evidence: `integration-tests/type-tests/package.json`
- **Package** (package_manifest): { "name": "vite-swc", "private": true, "version": "0.0.0", "type": "module", "scripts": { "dev": "vite --port 3000", "build": "tsc && vite build", "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview --port 3000", "serve-app": "npm run preview", "test": "playwright test" }, "dependencies": { "@apollo/client": "4.1.3", "react": "^18.3.0", "react-dom": "^18.3.0", "rxjs": "^7.8.2" }, "devDependencies": { "@playwright/test": " ", "@types/react": "^18.0.37", "@types/react-dom": "^18.0.11", "@typescript-eslint/eslint-plugin": "^5.59.0", "@typescript-eslint/parser": "^5.59.0", "@vitejs/plugin-react-swc": "^3.8.0", "eslint": "^8.38.0", "esl… Evidence: `integration-tests/vite-swc/package.json`
- **Package** (package_manifest): { "name": "vite", "private": true, "version": "0.0.0", "type": "module", "scripts": { "dev": "vite --port 3000", "build": "tsc && vite build", "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview --port 3000", "serve-app": "npm run preview", "test": "playwright test" }, "dependencies": { "@apollo/client": "4.1.3", "expect-type": "^1.2.1", "graphql": "^16.8.1", "react": "^18.3.0", "react-dom": "^18.3.0", "rxjs": "^7.8.2" }, "devDependencies": { "@playwright/test": " ", "@types/react": "^18.0.37", "@types/react-dom": "^18.0.11", "@typescript-eslint/eslint-plugin": "^5.59.0", "@typescript-eslint/parser": "^5.59.0", "@vitejs/plugin-reac… Evidence: `integration-tests/vite/package.json`
- **Package** (package_manifest): { "name": "wrapping-library", "devDependencies": { "typescript": "^5.9.3" }, "dependencies": { "@apollo/client": "4.1.3" }, "scripts": { "build": "tsc", "test": "true" } } Evidence: `integration-tests/wrapping-library/package.json`
- **Package** (package_manifest): { "name": "categorized", "private": true, "type": "module", "dependencies": { "js-yaml": "^4.2.0" } } Evidence: `scripts/changesets/categorized/package.json`
- **Package** (package_manifest): { "private": true, "devDependencies": { "jscodeshift": "0.16.1" } } Evidence: `scripts/codemods/ac2-to-ac3/package.json`
- **Package** (package_manifest): { "name": "@apollo/client-codemod-migrate-3-to-4", "version": "1.0.2", "description": "Apollo Client Codemod to migrate from version 3 to version 4", "keywords": "apollo", "client", "graphql", "codemod" , "author": "packages@apollographql.com", "license": "MIT", "type": "module", "sideEffects": false, "repository": { "type": "git", "url": "git+https://github.com/apollographql/apollo-client.git", "directory": "codegen" }, "bugs": { "url": "https://github.com/apollographql/apollo-client/issues" }, "homepage": "https://www.apollographql.com/docs/react/", "exports": { ".": "./dist/index.js", "./imports": "./dist/imports.js" }, "files": "dist", "README.md" , "bin": { "apollo-client-codemod-migra… Evidence: `scripts/codemods/ac3-to-ac4/package.json`
- **Package** (package_manifest): { "private": true, "devDependencies": { "jscodeshift": "17.1.1", "@types/jscodeshift": "0.12.0" } } Evidence: `scripts/codemods/data-masking/package.json`
- **Package** (package_manifest): { "name": "apollo-client-memory-tests", "private": true, "scripts": { "test": "node --expose-gc --test tests.cts" }, "dependencies": { "@apollo/client": "file:../../dist", "graphql": "^16.0.0" } } Evidence: `scripts/memory/package.json`
- **Apollo Client 4.x Guide** (skill_instruction): Apollo Client is a comprehensive state management library for JavaScript that enables you to manage both local and remote data with GraphQL. Version 4.x brings improved caching, better TypeScript support, and React 19 compatibility. Evidence: `docs/agent-skills/apollo-client/SKILL.md`
- **CLAUDE.md** (documentation): This file provides guidance to Claude Code claude.ai/code when working with code in this repository. Evidence: `CLAUDE.md`
- **Apollo Contributor Guide** (documentation): Excited about Apollo and want to make it better? We’re excited too! Evidence: `CONTRIBUTING.md`
- **License** (source_file): Copyright c 2022 Apollo Graph, Inc. Formerly Meteor Development Group, Inc. Evidence: `LICENSE`
- **License** (source_file): Copyright c Meta Platforms, Inc. and affiliates. Evidence: `src/react/internal/compiler-runtime/LICENSE`
- **Caching Reference** (documentation): - InMemoryCache Setup inmemorycache-setup - Cache Normalization cache-normalization - Type Policies type-policies - Field Policies field-policies - Pagination pagination - Cache Manipulation cache-manipulation - Garbage Collection garbage-collection Evidence: `docs/agent-skills/apollo-client/references/caching.md`
- **Error Handling Reference Apollo Client 4.x** (documentation): Error Handling Reference Apollo Client 4.x Evidence: `docs/agent-skills/apollo-client/references/error-handling.md`
- **Fragments Reference** (documentation): GraphQL fragments define a set of fields for a specific type. In Apollo Client, fragments are especially powerful when colocated with components to define each component's data requirements independently, creating a clear separation of concerns and enabling better component composition. Evidence: `docs/agent-skills/apollo-client/references/fragments.md`
- **Apollo Client Integration for Client-Side Apps** (documentation): Apollo Client Integration for Client-Side Apps Evidence: `docs/agent-skills/apollo-client/references/integration-client.md`
- **Apollo Client Integration with Next.js App Router** (documentation): Apollo Client Integration with Next.js App Router Evidence: `docs/agent-skills/apollo-client/references/integration-nextjs.md`
- **Apollo Client Integration with React Router Framework Mode** (documentation): Apollo Client Integration with React Router Framework Mode Evidence: `docs/agent-skills/apollo-client/references/integration-react-router.md`
- **Apollo Client Integration with TanStack Start** (documentation): Apollo Client Integration with TanStack Start Evidence: `docs/agent-skills/apollo-client/references/integration-tanstack-start.md`
- **Mutations Reference** (documentation): - useMutation Hook usemutation-hook - Mutation Variables mutation-variables - Loading and Error States loading-and-error-states - Optimistic UI optimistic-ui - Cache Updates cache-updates - Refetch Queries refetch-queries - Error Handling error-handling Evidence: `docs/agent-skills/apollo-client/references/mutations.md`
- **Queries Reference** (documentation): Note : In most applications, there should only be one use of a query hook per page. Use fragment-reading hooks useFragment , useSuspenseFragment with component-colocated fragments and data masking for the rest of the page components. Evidence: `docs/agent-skills/apollo-client/references/queries.md`
- **State Management Reference** (documentation): - Reactive Variables reactive-variables - Local-Only Fields local-only-fields - LocalState Resolvers localstate-resolvers - Combining Remote and Local State combining-remote-and-local-state - useReactiveVar Hook usereactivevar-hook Evidence: `docs/agent-skills/apollo-client/references/state-management.md`
- **Suspense Hooks Reference** (documentation): Note : Suspense hooks are the recommended approach for data fetching in modern React applications React 18+ . They provide cleaner code, better loading state handling, and enable streaming SSR. Evidence: `docs/agent-skills/apollo-client/references/suspense-hooks.md`
- **Troubleshooting Reference** (documentation): - Setup Issues setup-issues - Cache Issues cache-issues - TypeScript Issues typescript-issues - Performance Issues performance-issues - DevTools Usage devtools-usage - Common Error Messages common-error-messages Evidence: `docs/agent-skills/apollo-client/references/troubleshooting.md`
- **TypeScript Code Generation** (documentation): This guide covers setting up GraphQL Code Generator for type-safe Apollo Client usage with TypeScript. Evidence: `docs/agent-skills/apollo-client/references/typescript-codegen.md`
- **Schema.Package.Json** (source_file): export type JSONSchemaForNPMPackageJsonFiles = { k: string : unknown; } & { name?: string; version?: string; description?: string; keywords?: string ; homepage?: string; bugs?: { url?: string; email?: string; k: string : unknown; } string; license?: string "AGPL-3.0-only" "Apache-2.0" "BSD-2-Clause" "BSD-3-Clause" "BSL-1.0" "CC0-1.0" "CDDL-1.0" "CDDL-1.1" "EPL-1.0" "EPL-2.0" "GPL-2.0-only" "GPL-3.0-only" "ISC" "LGPL-2.0-only" "LGPL-2.1-only" "LGPL-2.1-or-later" "LGPL-3.0-only" "LGPL-3.0-or-later" "MIT" "MPL-2.0" "MS-PL" "UNLICENSED" ; licenses?: { type?: License; url?: string; k: string : unknown; } ; author?: Person; contributors?: Person ; maintainers?: Person ; files?: string ; main?: st… Evidence: `config/schema.package.json.ts`
- **Apolloclient** (source_file): import type { NormalizedCacheObject } from "@apollo/client"; import { ApolloClient, HttpLink, InMemoryCache, from, ApolloLink, CombinedGraphQLErrors, } from "@apollo/client"; import { onError } from "@apollo/client/link/error"; import merge from "deepmerge"; import isEqual from "lodash/isEqual"; import type { GetServerSidePropsResult } from "next"; import { Observable } from "rxjs"; import { schemaLink } from "./schemaLink.ts"; ⋮---- function createApolloClient ⋮---- export function initializeApollo initialState: NormalizedCacheObject null = null ⋮---- interface ApolloProps { APOLLO STATE PROP NAME : NormalizedCacheObject; } ⋮---- export function addApolloState client: ApolloClient, pagePro… Evidence: `integration-tests/next/src/libs/apolloClient.ts`
- **Index** (source_file): import { InMemoryCache } from "@apollo/client"; import { ApolloClient, ApolloLink } from "@apollo/client"; import { clientQuery, clientMutate, useQuery, useLazyQuery, useSuspenseQuery, useBackgroundQuery, useLoadableQuery, useMutation, preloadQuery, } from "../shared/scenarios.js"; import { expectTypeOf } from "expect-type"; Evidence: `integration-tests/type-tests/defaultOptions/defaults/index.ts`
- **Index** (source_file): import { InMemoryCache } from "@apollo/client"; import { ApolloClient, ApolloLink } from "@apollo/client"; import { clientMutate, useMutation } from "../../shared/scenarios.js"; import { expectTypeOf } from "expect-type"; ⋮---- interface WatchQuery {} interface Query {} interface Mutate { errorPolicy: "all"; } Evidence: `integration-tests/type-tests/defaultOptions/mutate/errorPolicyAll/index.ts`
- **Index** (source_file): import { InMemoryCache } from "@apollo/client"; import { ApolloClient, ApolloLink } from "@apollo/client"; import { clientMutate, useMutation } from "../../shared/scenarios.js"; import { expectTypeOf } from "expect-type"; ⋮---- interface WatchQuery {} interface Query {} interface Mutate { errorPolicy: "ignore"; } Evidence: `integration-tests/type-tests/defaultOptions/mutate/errorPolicyIgnore/index.ts`
- **Index** (source_file): import { InMemoryCache } from "@apollo/client"; import { ApolloClient, ApolloLink } from "@apollo/client"; import { clientMutate, useMutation } from "../../shared/scenarios.js"; import { expectTypeOf } from "expect-type"; ⋮---- interface WatchQuery {} interface Query {} interface Mutate { errorPolicy: "none"; } Evidence: `integration-tests/type-tests/defaultOptions/mutate/errorPolicyNone/index.ts`
- **Index** (source_file): import { InMemoryCache } from "@apollo/client"; import { ApolloClient, ApolloLink } from "@apollo/client"; import { clientQuery } from "../../shared/scenarios.js"; import { expectTypeOf } from "expect-type"; ⋮---- interface WatchQuery {} interface Query { errorPolicy: "all"; } interface Mutate {} Evidence: `integration-tests/type-tests/defaultOptions/query/errorPolicyAll/index.ts`
- **Index** (source_file): import { InMemoryCache } from "@apollo/client"; import { ApolloClient, ApolloLink } from "@apollo/client"; import { clientQuery } from "../../shared/scenarios.js"; import { expectTypeOf } from "expect-type"; ⋮---- interface WatchQuery {} interface Query { errorPolicy: "ignore"; } interface Mutate {} Evidence: `integration-tests/type-tests/defaultOptions/query/errorPolicyIgnore/index.ts`
- **Index** (source_file): import { InMemoryCache } from "@apollo/client"; import { ApolloClient, ApolloLink } from "@apollo/client"; import { clientQuery } from "../../shared/scenarios.js"; import { expectTypeOf } from "expect-type"; ⋮---- interface WatchQuery {} interface Query { errorPolicy: "none"; } interface Mutate {} Evidence: `integration-tests/type-tests/defaultOptions/query/errorPolicyNone/index.ts`
- **Index** (source_file): import { expectTypeOf } from "expect-type"; import { clientMutate, clientQuery, useQuery, useLazyQuery, useSuspenseQuery, useBackgroundQuery, useLoadableQuery, useMutation, preloadQuery, } from "../shared/scenarios.js"; import { ApolloClient, InMemoryCache, ApolloLink } from "@apollo/client"; ⋮---- interface WatchQuery { errorPolicy?: "none" "ignore" "all"; returnPartialData?: boolean; } interface Query { errorPolicy?: "none" "ignore" "all"; } interface Mutate { errorPolicy?: "none" "ignore" "all"; } Evidence: `integration-tests/type-tests/defaultOptions/unions/index.ts`
- **Index** (source_file): import { expectTypeOf } from "expect-type"; import { ApolloClient, InMemoryCache, ApolloLink } from "@apollo/client"; import { clientMutate, clientQuery, useBackgroundQuery, useLazyQuery, useLoadableQuery, useMutation, useQuery, useSuspenseQuery, preloadQuery, } from "../shared/scenarios.js"; ⋮---- interface WatchQuery { errorPolicy?: "ignore" "all"; returnPartialData?: never; } interface Query { errorPolicy?: "ignore" "all"; } interface Mutate { errorPolicy?: "ignore" "all"; } Evidence: `integration-tests/type-tests/defaultOptions/unionsWithOptional/index.ts`
- **Index** (source_file): import { InMemoryCache } from "@apollo/client"; import { ApolloClient, ApolloLink } from "@apollo/client"; import { useQuery, useLazyQuery, useSuspenseQuery, useBackgroundQuery, useLoadableQuery, preloadQuery, } from "../../shared/scenarios.js"; import { expectTypeOf } from "expect-type"; ⋮---- interface WatchQuery { errorPolicy: "all"; } interface Query {} interface Mutate {} Evidence: `integration-tests/type-tests/defaultOptions/watchQuery/errorPolicyAll/index.ts`
- **Index** (source_file): import { InMemoryCache } from "@apollo/client"; import { ApolloClient, ApolloLink } from "@apollo/client"; import { useQuery, useLazyQuery, useSuspenseQuery, useBackgroundQuery, useLoadableQuery, preloadQuery, } from "../../shared/scenarios.js"; import { expectTypeOf } from "expect-type"; ⋮---- interface WatchQuery { errorPolicy: "ignore"; } interface Query {} interface Mutate {} Evidence: `integration-tests/type-tests/defaultOptions/watchQuery/errorPolicyIgnore/index.ts`
- **Index** (source_file): import { InMemoryCache } from "@apollo/client"; import { ApolloClient, ApolloLink } from "@apollo/client"; import { useQuery, useLazyQuery, useSuspenseQuery, useBackgroundQuery, useLoadableQuery, preloadQuery, } from "../../shared/scenarios.js"; import { expectTypeOf } from "expect-type"; ⋮---- interface WatchQuery { errorPolicy: "none"; } interface Query {} interface Mutate {} Evidence: `integration-tests/type-tests/defaultOptions/watchQuery/errorPolicyNone/index.ts`
- **Index** (source_file): import { InMemoryCache } from "@apollo/client"; import { ApolloClient, ApolloLink } from "@apollo/client"; import { useQuery, useLazyQuery, useSuspenseQuery, useBackgroundQuery, useLoadableQuery, preloadQuery, } from "../../shared/scenarios.js"; import { expectTypeOf } from "expect-type"; ⋮---- interface WatchQuery { returnPartialData: true; } interface Query {} interface Mutate {} Evidence: `integration-tests/type-tests/defaultOptions/watchQuery/returnPartialDataTrue/index.ts`
- The remaining 17 evidence entries are in `AI_CONTEXT_PACK.json` or `EVIDENCE_INDEX.json`.

## Rules the Host AI Must Follow

- **Treat this asset as pre-work context, not a runtime environment.**: The AI Context Pack contains only an evidence-backed understanding of the project, not the project's executable state. Evidence: `docs/README.md`, `.changeset/README.md`, `README.md`
- **When answering the user, distinguish what can be previewed from what can only be verified after install.**: The consumer value of the pre-install experience comes from reducing bad installs and misjudgments, not from pretending to be a real run. Evidence: `docs/README.md`, `.changeset/README.md`, `README.md`

## Questions the User Should Answer First

- Which host AI or local environment do you plan to use it in?
- Do you just want to experience the workflow first, or are you ready to actually install?
- What matters most to you: install cost, output quality, or conflicts with your existing rules?

## Acceptance Checks

- Every capability claim can be traced back to a file path in evidence_refs.
- AI_CONTEXT_PACK.md does not package previews as a real run.
- The user can understand who it fits, what it can do, how to start, and the risk boundaries within 3 minutes.

---

## Doramagic Context Augmentation

The following sections strengthen the repository context for a host AI. Human Manual data is a reading route, and pitfall notes become operating constraints.

## Human Manual Outline

Usage rule: this is only a reading route and salience signal, not factual authority. Concrete claims must still return to repo evidence or Claim Graph.

Host AI hard rules:
- Do not treat page titles, section order, summaries, or importance values as factual project evidence.
- When explaining the Human Manual outline, state that it is only a reading route or salience signal.
- Capability, installation, compatibility, runtime state, and risk claims must cite repo evidence, source paths, or Claim Graph.

- **Project Overview and Core Architecture**: importance `high`
  - source_paths: README.md, package.json, src/core/index.ts, src/core/ApolloClient.ts, src/core/QueryManager.ts
- **Caching System and InMemoryCache**: importance `high`
  - source_paths: src/cache/index.ts, src/cache/core/cache.ts, src/cache/core/types/Cache.ts, src/cache/core/types/common.ts, src/cache/inmemory/inMemoryCache.ts
- **React Integration, Hooks, and SSR**: importance `high`
  - source_paths: src/react/index.ts, src/react/index.react-server.ts, src/react/context/ApolloContext.ts, src/react/context/ApolloProvider.tsx, src/react/hooks/useApolloClient.ts
- **Network Links, Transport, Errors, and v3 to v4 Migration**: importance `high`
  - source_paths: src/link/core/ApolloLink.ts, src/link/core/from.ts, src/link/core/split.ts, src/link/core/concat.ts, src/link/core/execute.ts

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `c6840fcff5a1e99c84471fa5a7375552c6723b29`
- inspected_files: `README.md`, `package.json`, `docs/README.md`, `docs/agent-skills/apollo-client/SKILL.md`, `docs/agent-skills/apollo-client/references/caching.md`, `docs/agent-skills/apollo-client/references/error-handling.md`, `docs/agent-skills/apollo-client/references/fragments.md`, `docs/agent-skills/apollo-client/references/integration-client.md`, `docs/agent-skills/apollo-client/references/integration-nextjs.md`, `docs/agent-skills/apollo-client/references/integration-react-router.md`, `docs/agent-skills/apollo-client/references/integration-tanstack-start.md`, `docs/agent-skills/apollo-client/references/mutations.md`, `docs/agent-skills/apollo-client/references/queries.md`, `docs/agent-skills/apollo-client/references/state-management.md`, `docs/agent-skills/apollo-client/references/suspense-hooks.md`, `docs/agent-skills/apollo-client/references/troubleshooting.md`, `docs/agent-skills/apollo-client/references/typescript-codegen.md`, `docs/shared/MdxProvidedComponents.ts`, `docs/source/_sidebar.yaml`, `docs/source/api/cache/InMemoryCache.mdx`

Host AI hard rules:
- Without repo_clone_verified=true, do not claim that the source code has been read.
- Without repo_inspection_verified=true, do not write README, docs, or package-file conclusions as facts.
- Without quick_start_verified=true, do not claim that the Quick Start path has run successfully.

## Doramagic Pitfall Constraints

These rules come from Doramagic discovery, validation, or compilation findings. The host AI must treat them as operating constraints, not background notes.

### Constraint 1: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: @apollo/client@4.2.3
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: @apollo/client@4.2.3. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Upgrade or migration may change expected behavior: @apollo/client@4.2.3
- Evidence: failure_mode_cluster:github_release | https://github.com/apollographql/apollo-client/releases/tag/%40apollo/client%404.2.3
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 2: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: Dependency Dashboard
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Dependency Dashboard. Context: Observed when using node
- Why it matters: Developers may fail before the first successful local run: Dependency Dashboard
- Evidence: failure_mode_cluster:github_issue | https://github.com/apollographql/apollo-client/issues/11062
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 3: Configuration risk requires verification

- Trigger: Developers should check this configuration risk before relying on the project: @apollo/client@4.3.0-alpha.2
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: @apollo/client@4.3.0-alpha.2. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Upgrade or migration may change expected behavior: @apollo/client@4.3.0-alpha.2
- Evidence: failure_mode_cluster:github_release | https://github.com/apollographql/apollo-client/releases/tag/%40apollo/client%404.3.0-alpha.2
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 4: Capability evidence risk requires verification

- Trigger: README/documentation is current enough for a first validation pass.
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: capability.assumptions | https://github.com/apollographql/apollo-client
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 5: Runtime risk requires verification

- Trigger: Developers should check this runtime risk before relying on the project: @apollo/client-graphql-codegen@2.1.1
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: @apollo/client-graphql-codegen@2.1.1. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Upgrade or migration may change expected behavior: @apollo/client-graphql-codegen@2.1.1
- Evidence: failure_mode_cluster:github_release | https://github.com/apollographql/apollo-client/releases/tag/%40apollo/client-graphql-codegen%402.1.1
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
