🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

@prisma/extension-accelerate

Package Overview
Dependencies
Maintainers
2
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prisma/extension-accelerate

Prisma Client extension for Accelerate

npmnpm
Version
0.0.0-experimental-da0d903
Version published
Weekly downloads
76K
-9.22%
Maintainers
2
Weekly downloads
 
Created
Source

Accelerate Prisma Client extension

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

Prisma Accelerate provides an external connection pool and global caching layer that you can use to speed up your database queries.

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

  • Prisma ORM: Next-generation Node.js and TypeScript ORM, supporting PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, CockroachDB, and MongoDB.

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 Accelerate

Resources

You can explore Accelerate with the following resources:

Using Accelerate

1. Enable Accelerate

Log into Prisma Data Platform and enable Accelerate for your project.

2. Add Accelerate to your application

Replace the database connection string with the Accelerate connection string you generated in Prisma Data Platform (assuming you store your database connection string in the DATABASE_URL in the .env file):

DATABASE_URL="prisma://accelerate.prisma-data.net/?api_key=__API_KEY__"
import "dotenv/config";
import { defineConfig, env } from "prisma/config";

export default defineConfig({
  schema: "prisma/schema.prisma",
  datasource: {
    url: env("DATABASE_URL"),
  },
});
DATABASE_URL="prisma://accelerate.prisma-data.net/?api_key=__API_KEY__"

Finally, configure your Prisma Client instance with the accelerateUrl to enable Accelerate’s connection pool:

import "dotenv/config";
import { PrismaClient } from "./generated/client";

const prisma = new PrismaClient({
  accelerateUrl: process.env.DATABASE_URL,
});

And in your schema.prisma

generator client {
  provider   = "prisma-client"
  output     = "./generated"
}

3. Add caching to your Accelerate queries

You can optionally configure caching on a per-query level using the ttl (Time-To-Live) and swl (Stale-While-Revalidate) options:

await prisma.user.findMany({
  cacheStrategy: {
    ttl: 3_600,
    swr: 500,
  },
});

FAQs

Package last updated on 21 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts