Skip to content
CAI
Software that uses CAICheck a score

graphql/dataloader

54.5

Adequate · 1 October 2026

633

lines of production code

JavaScript

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is the DataLoader library, a utility designed to batch and cache data loading requests to optimize performance. It provides core functionality for batching operations, caching results with customizable keys, and pre-populating caches, while exposing an API that handles individual load errors gracefully. The project also includes comprehensive test coverage and type definitions to ensure reliability and static type checking for consumers.

Features

Added Flow type definitions for Jest v24

The project now includes Flow type definitions for Jest v24 (specifically the v0.104.x+ signature) in the flow-typed directory. This addition enables static type checking for Jest APIs, including core mocking functions, matchers, and plugins like jest-styled-components and jest-enzyme, ensuring that test code adheres to the expected Jest interface.

flow-typed · high confidence

Behavioural changes

DataLoader API and behavior updates

The DataLoader library introduces several behavioral changes and API enhancements. The \loadMany\ method now resolves with an array of values or Error instances instead of rejecting the promise on failure, allowing callers to handle individual load errors. A new \prime\ method allows pre-populating the cache with specific key-value pairs. The constructor now accepts a \name\ option for APM tracking and supports custom schedulers via \batchScheduleFn\. Additionally, the library now supports \ArrayLike\ inputs for \loadMany\ and allows custom cache key functions and cache map instances via options.

src · high confidence

DataLoader v2.2.3 release with caching and type fixes

This release updates the changelog to v2.2.3, which ensures the \cacheKeyFn\ is not called when caching is disabled. It also includes previous patch fixes: adding the missing type definition for \DataLoader.name\ (v2.2.2), making \name\ an optional property (v2.2.1), and fixing type definitions for priming the cache with promises (v2.2.0). The repository configuration has been modernized by switching from Travis CI to GitHub Actions, migrating tests to Jest, and adopting Prettier for code formatting.

(repo-wide) · high confidence

Migrate test runner to Jest and clean up build resources

The development watch script (resources/watch.js) now uses Jest instead of Mocha for running tests, and the file watcher has been narrowed to monitor only JavaScript files (removing .graphql from the glob). Several legacy resource files have been removed, including the Git state check script (checkgit.sh), the Travis CI matrix helper (travis\_after\_all.py), and the Mocha bootload configuration (mocha-bootload.js). Additionally, the prepublish script (prepublish.sh) has been updated to clean build artifacts, copy distribution files to the root for a cleaner package structure, and strip non-essential fields from the published package.json.

resources · high confidence

Test coverage

Migrated test suite to Jest

The test suite in src/\_\tests\\_ has been migrated from Mocha/Chai to Jest. This change includes new test files (such as abuse.test.js, browser.test.js, and dataloader.test.js) that verify DataLoader behavior, including API abuse error messages, browser compatibility without process.nextTick, and primary batching features, while removing the legacy Mocha test files.

src/\\tests\\_ · high confidence_

Dependencies

Upgrade to Babel 7 and migrate tests to Jest

The project has upgraded its build tooling from Babel 5 to Babel 7, updating core dependencies like @babel/core and @babel/cli to their latest versions. Additionally, the test runner has been switched from Mocha to Jest, and the entry point has changed from the 'dist' directory to the root 'index.js'.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 54 → 54 (+0.1)
  • Rubric changed (rubric-2026.09.12 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 47 → 47 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 55 → 55 (+0.0)
  • Readiness 63 → 64 (+1.0)
  • Security 76 → 76 (+0.0)

Resolved (6)

  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (no pnpm-resolved versions to grade)
  • Documentation: no architecture or design documentation (.changeset/README.md)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • High CVE: [GHSA redacted] (yarn.lock)
  • No tests — template/sample

New (2)

  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (the committed lockfile resolved no direct production dependency)
  • High CVE: [GHSA redacted] (yarn.lock)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

graphql/dataloader was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 1 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 65be452f5ffad3eede2d862dc26c96003fa87ef3 — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.