1.0.1 • Published 10 months ago

@prisma/extension-optimize v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
10 months ago

Optimize Prisma Client extension

This is the package for the Prisma Client extension that enables usage of Prisma Optimize.

Optimize enables developers to profile and get performance-related recommendations while developing applications with Prisma.

It is part of the Prisma ecosystem, alongside other tools such as:

Prisma is leading Data DX, a philosophy that promotes simplicity in data-driven application development. Learn more on the Data DX manifesto.

Getting started with Optimize

Enabling Optimize in your local development workflow is really simple.

1. Install the extension

npm install @prisma/extension-optimize --save-dev

Starting a Prisma project from scratch? Follow https://www.prisma.io/docs/getting-started

2. Enable the tracing preview feature in your schema

 generator client {
   provider        = "prisma-client-js"
+  previewFeatures = ["tracing"]
 }

After enabling the tracing preview feature, you need to re-generate your Prisma Client:

npx prisma generate

3. Extend your Prisma Client with Optimize support

import { PrismaClient } from "@prisma/client";
import { withOptimize } from "@prisma/extension-optimize";

const prisma = new PrismaClient().$extends(withOptimize());

The extension will orchestrate the user experience around Optimize. You will:

  • Be required to log into the Prisma Data Platform through your GitHub account
  • And be instructed to visit the URL of your Optimize dashboard:
[...]
> tsx index.ts

┌─────────────────────────────────┐
│ See your Optimize dashboard at: │
│ https://optimize.prisma.io/     │
└─────────────────────────────────┘
[...]

Got feedback?

Please submit an issue or join a discussion in our feedback repository

1.0.1

12 months ago

1.0.0

12 months ago

0.9.0

1 year ago

0.9.0-dev.3

1 year ago

0.9.0-dev.2

1 year ago

0.9.0-dev.1

1 year ago

0.10.1

1 year ago

0.10.0

1 year ago

0.8.0

1 year ago

0.7.1

1 year ago

0.7.0

1 year ago

0.6.0

1 year ago

0.5.4

1 year ago

0.5.3

1 year ago

0.5.2

1 year ago

0.5.1

1 year ago

0.5.0

1 year ago