Nx Tools
APIExecutorsseed

seed

Runs the database seed script to populate the database with initial data.

Options can be configured in project.json when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/reference/project-configuration#targets.

Info

Database seeding is useful for populating your database with initial or test data during development.

Examples

apps/your-app/project.json
"prisma-seed": {
  "executor": "@nx-tools/nx-prisma:seed",
}

You may want to use a custom schema file:

apps/your-app/project.json
"prisma-seed": {
  "executor": "@nx-tools/nx-prisma:seed",
  "options": {
    "script": "scripts/custom-seed.ts",
    "executeWith": "tsx"
  }
}

Options:

Prop

Type

Last updated on

On this page