Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export pre-populated databases #17

Closed
marcosvega91 opened this issue Dec 14, 2020 · 2 comments
Closed

Export pre-populated databases #17

marcosvega91 opened this issue Dec 14, 2020 · 2 comments
Labels
DX Improves developer experience

Comments

@marcosvega91
Copy link
Member

We can provide some api to generate handles, entities, models, for example I can create Pokemon API by using

import { createPokemonAPIs } from '@mswjs/data/pokemon'

createPokemonAPIs(mswInstance)

The function will create a new db with pokemon entities, populate with some data and attach to msw instance the handlers.
We can add more examples that can be used for POC applications

@kettanaito
Copy link
Member

Hey, @marcosvega91. I think having a pre-defined set of models is a good idea. Let's tackle this once the main functionality of this library is implemented? I feel like right now we are in the design phase, and things may shift and change. Populating such ready-to-use presets is better on a relatively stable library.

@marcosvega91
Copy link
Member Author

Yes yes it was only a way to track this feature

@kettanaito kettanaito added the DX Improves developer experience label Dec 15, 2020
@kettanaito kettanaito changed the title Create database with pre populated entities Export pre-populated databases Feb 4, 2021
@mswjs mswjs locked and limited conversation to collaborators Apr 9, 2022
@kettanaito kettanaito converted this issue into discussion #204 Apr 9, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
DX Improves developer experience
Projects
None yet
Development

No branches or pull requests

2 participants