data
data copied to clipboard
Data modeling and relation library for testing JavaScript applications.
As far as I am aware this library only exposes types for the exported functions. This makes it hard to type use-cases that go beyond "creating a few models and...
It should be possible to approach data modeling type-first by reusing existing TypeScript interfaces to annotate the data. This is useful when there are types generated from the server (i.e....
## GitHub - Closes #31 ## Changes - [x] Adds `createMany` model method to create multiple random instances of the model. - [ ] Supports multiple randomly created entities that...
It would be nice to support nested conjunctions/disjunctions (AND/OR) for creating complex where clause queries. Example from the [Prisma docs](https://www.prisma.io/docs/concepts/components/prisma-client/crud#filter-by-multiple-field-values): ```ts const users = await prisma.user.findMany({ where: { OR: [...
- Fixes #186
As a follow-up of #175, we need to add more granular tests to other relationship kinds (currently only the `one-to-one` kind was properly covered).
As part of a conversation around updating related models in https://github.com/mswjs/data/discussions/167 it was discovered that performing an update such as the example below causes an invariant violation with the error...
## Motivation Not all the modeled data are meant to be queryable. In certain cases, it's required to only describe the objects and have an API to seed them on...
Consider this case: ```ts const db = factory({ entity: { id: primaryKey(datatype.uuid), name: String, matrix: () => [[0,0,0], [1,1,1], [2,2,2]] } }) ``` This results in TS error ``` Property...
## GitHub - Follow up #12 ## What Given the following model declarations: ```js const db = factory({ user: { id: primaryKey(String), posts: manyOf('post') }, post: { slug: primaryKey(String) }...