Seed Prisma database with mock data using Snaplet Seed

How to seed your Prisma Project with Snaplet Seed

It’s no secret that we’re big fans of Prisma - after all, it’s the ORM we use ourselves every day at Snaplet. We particularly appreciate how intuitive and readable the Prisma schema is, and having type-safety makes it super easy to use, and hard to mess up!

Similarly, our intention with Snaplet Seed is to take all the hassle and complexity out of getting realistic mock data for your database. With that in mind, we’re excited to introduce Adapters to Snaplet Seed. Adapters allow Seed to support multiple databases and ORMs, and minimize the need for user  configuration, which in this case, make it super simple to get started seeding your project if you’re a Prisma user.

Whether you’ve got an existing Prisma project, or if you’ve started a new one by following the Prisma Quick Start guide, installing Snaplet Seed using npx @snaplet/seed will now automatically detect that you're using Prisma, and import the Snaplet Seed Prisma Adapter.

It's as easy as that, meaning you get right down to seeding data and less time on configuration.

Watch as Snaplet developer Khaya Zulu does a quick demo of just how is easy it is to use Snaplet Seed for your Prisma project:

If you’re a Prisma user and want to try Snaplet Seed to quickly and easily generate mock data for your project, check out our Prisma integration guide.

We promise you’ll want to throw away your seed script after using Snaplet Seed!

Jian Reis
January 24, 2022