Prisma Client and schema preview features

The following Preview feature flags are available for Prisma Client and the Prisma schema:

To enable a Preview feature, add the feature flag to the generator block in the schema.prisma file. Share your feedback on all Preview features on GitHub.

Enabling a Prisma Client preview feature

To enable a Prisma Client Preview feature:

  1. Add the Preview feature flag to the generator block:

    generator client {
    provider = "prisma-client-js"
    previewFeatures = ["mongoDb"]
    }
  2. Re-generate the client:

    $npx prisma generate
  3. If you are using Visual Studio Code and the Preview feature is not available in your .ts file after generating the client, run the TypeScript: Restart TS server command.

Edit this page on GitHub