RepoPilot

apollographql / apollo-client

Search apollographql/apollo-client

GitHub

Code

How apollographql/apollo-client is laid out, and where to start for common changes.

There is no import map for this report yet.

Where to start reading

  1. Repository root
  2. Repository root
  3. Declared package entry
  4. Declared package entry
  5. Declared package entry
  6. Likely start-up file
  7. Likely start-up file
  8. Suggested starting pointAI

Find files for a task

AI

Add a new network link

  • Implement request/response processing by extending or composing with BaseBatchHttpLink or similar
  • Export the link from src/link/index.ts for public API access
  • Add error handling using types from src/errors/ and integrate with QueryManager error flow

Add a new cache operation or eviction policy

  • Define new operation method in the abstract interface src/cache/core/cache.ts
  • Implement the operation in src/cache/inmemory/entityStore.ts for normalized cache
  • Add corresponding method to QueryManager for integration with query lifecycle
  • Export and document in src/cache/index.ts

Add a new React hook

  • Create hook in src/react/hooks/ or src/react/hooks/internal/ following RxJS observable patterns
  • Use useDeepMemo or useIsomorphicLayoutEffect from src/react/hooks/internal/ for optimization
  • Integrate with ApolloClient via ApolloContext from src/react/context/ApolloContext.ts

Add a new error type

  • Create error class in src/errors/ extending Error or existing error base
  • Integrate error into QueryManager or link error flow for proper handling

Change the public API

  • Declared by package.json (exports..). Follow its exports or calls to find the implementation.
  • Declared by package.json (exports../cache). Follow its exports or calls to find the implementation.
  • Declared by package.json (exports../dev). Follow its exports or calls to find the implementation.

Trace runtime behavior

Add or update tests

Change build or automation

RepoPilot lists up to 500 files, so a file missing here may still exist.

  • Files marked “likely” are guessed from their names.
  • Some entry points named in the manifest are build output or are missing from the file list, so their source is not shown.

Code quality and hotspots

Largest source files

  • Branch points99 per file on average
  • Code issues0 errors, 53 warnings
  • Largest file2,338 lines
  • Hotspot load9 high-risk files

Static checks on the 15 largest source files.

Tests, CI and tooling

  • CICircleCI · GitHub Actions19 workflows
  • Tests283 test filesJest/Vitest · 0.53 test files per source file (file count, not coverage)
  • Dependency updatesRenovate

Test folders: scripts/codemods/ac3-to-ac4/src/__tests__ · src/__tests__ · eslint-local-rules

Hotspots

Files that change often and branch heavily, highest first. Branch points count if, loop, case, catch, ternary, && and || in the file.