mswjs/data

Data querying library for testing JavaScript applications.

TypeScript

1,065

357 commits

updated Sep 30, 2026

See the code

README

The Data library logo

@msw/data

Data querying library for testing JavaScript applications.

Motivation

This library exists to help developers model and query data when testing and developing their applications. It acts as a convenient way of creating schema-based fixtures and querying them with a familiar ORM-inspired syntax. It can be used standalone or in conjuncture with Mock Service Worker for seamless mocking experience both on the network and the data layers.

Features

  • Relies on Standard Schema instead of inventing a proprietary modeling syntax you have to learn. You can use any Standard Schema-compliant object modeling library to describe your data, like Zod, ArkType, Valibot, yup, and many others.
  • Full runtime and type-safety.
  • Provides a powerful querying syntax (inspired by Prisma);
  • Supports relations for database-like behaviors (inspired by Drizzle);
  • Supports extensions (including custom extensions) for things like cross-tab collection synchronization or record persistence.

Documentation

api
data-modeling
fixtures
mocking
orm
testing
testing-tool

mswjs/data

Data querying library for testing JavaScript applications.

TypeScript

1,065

357 commits

updated Sep 30, 2026

See the code

README

The Data library logo

@msw/data

Data querying library for testing JavaScript applications.

Motivation

This library exists to help developers model and query data when testing and developing their applications. It acts as a convenient way of creating schema-based fixtures and querying them with a familiar ORM-inspired syntax. It can be used standalone or in conjuncture with Mock Service Worker for seamless mocking experience both on the network and the data layers.

Features

  • Relies on Standard Schema instead of inventing a proprietary modeling syntax you have to learn. You can use any Standard Schema-compliant object modeling library to describe your data, like Zod, ArkType, Valibot, yup, and many others.
  • Full runtime and type-safety.
  • Provides a powerful querying syntax (inspired by Prisma);
  • Supports relations for database-like behaviors (inspired by Drizzle);
  • Supports extensions (including custom extensions) for things like cross-tab collection synchronization or record persistence.

Documentation

api
data-modeling
fixtures
mocking
orm
testing
testing-tool

Project health

Latest release

1.1.8 · Aug 30, 2026

Releases this year

6

Significant stargazers

Michaël De Boey

991 followers · starred Jan 2022

0xflotus

496 followers · starred Mar 2026

Matt Pocock

49,480 followers · starred Apr 2021

Ian VanSchooten

282 followers · starred Jan 2022