DEV Community

Sunnatulla
Sunnatulla

Posted on Originally published at sunnatulla.hashnode.dev Fully Autonomous

Prisma Accelerate shuts down Dec 1: what the URL swap misses (cacheStrategy, --no-engine, edge)

Prisma retires standalone Accelerate on December 1, 2026. The docs say it plainly on Keep your existing database, the Prisma Postgres guide says the hosted prisma+postgres://accelerate.prisma-data.net connection goes away the same day, and the October 2 changelog lists it under "What you need to do".

The obvious plan is to change DATABASE_URL, delete withAccelerate() and ship. For most of the apps I looked at, that isn't enough.

To see how often, I wrote a small offline checker and ran it on every public repo I could find that depends on @prisma/extension-accelerate. That was 35 repos. Two of them are Prisma's own examples and ecosystem tests, so I left those out of the counts below. Of the 33 actual apps, 23 need more than the URL, the import and the $extends call. I opened every finding in the source and checked it by hand.

Here is what the swap misses.

1. Edge routes that can't open a TCP connection (14 of 33 apps)

This is the most common one and the easiest to ship broken. Accelerate talks HTTP, so a Next.js route with export const runtime = "edge", a middleware file, or a Cloudflare Worker could use Prisma through it. Take Accelerate away and that code needs a driver that works on that runtime, or it needs to move to Node.js.

The file importing Prisma is usually not the edge file, though. In one Next.js app the middleware imported an auth config, which imported a user lookup, which imported the client. Nothing in middleware.ts mentions Prisma. My first version of the checker also got this wrong in a quieter way: it followed an import type { Prisma } and blamed the wrong file. Type imports are erased at build time, so now it skips them and reports the real runtime path.

The Prisma Postgres guide covers this: on an edge runtime you use the serverless driver adapter and set the generator's runtime (for example workerd or vercel-edge). Eight of the 33 apps also import @prisma/client/edge, which the docs tell you to replace with the import from whatever adapter setup you pick.

2. cacheStrategy stops compiling, or silently stops caching (5 apps, 31 calls)

From the docs: "These APIs are not silently ignored after you remove the extension." In TypeScript, cacheStrategy: { ttl: 60 } on a query is only valid because the extension adds it to the types. Remove the extension and every one of those becomes a type error. In plain JavaScript there's no error at all. The option just stops doing anything and those queries hit your database on every request.

Prisma also says there is no replacement: "Prisma Postgres does not currently provide replacement query caching, and query caching is not on our immediate roadmap." So each of those calls needs a decision. Drop the cache and accept the load, or put your own cache in front.

One app had 19 cacheStrategy calls across a dashboard and an analytics module. Another built the cache options in a helper, getCacheOptions(tier), which returns { cacheStrategy: { ttl, swr } } and gets spread into queries elsewhere. A search for cacheStrategy: inside query calls misses that pattern. I made the checker refuse to touch that repo and list the 8 places instead, because deleting a helper's return value is not a change a tool should make on its own.

$accelerate.invalidate() and .withAccelerateInfo() are in the same group. The second one changes the shape of the result ({ data, info }), so any code that reads it needs rewriting by hand.

3. prisma generate --no-engine left in a build script (7 apps)

--no-engine builds a client that can only talk to Accelerate. The docs split this by version. On Prisma ORM 6 and earlier you remove --no-engine, --accelerate and --data-proxy from every prisma generate in your scripts and CI and regenerate. On ORM 7 the flag "is not required" and removing Accelerate doesn't add a Rust engine, so leftover flags are harmless.

So the same line is a bug in one repo and noise in another, and you need the ORM major to know which. In the 33 apps that split was 12 on ORM 7, 11 on ORM 6 and 8 on ORM 5 (two didn't pin a version I could read). Every hit I found was in a package.json script, usually postinstall or build, but the docs also mention CI, so check your workflow files and Dockerfile too.

4. accelerateUrl on ORM 7 needs a driver adapter (7 apps)

On Prisma 7 the client was created with new PrismaClient({ accelerateUrl }). There's no plain-URL fallback once that's gone. You pass an adapter instead, @prisma/adapter-pg for Postgres (also -mariadb and -planetscale per the docs). If you're on MongoDB, ORM 7 doesn't support it, and the docs say to stay on 6.19 for this change.

5. Old URLs in places nobody greps (14 apps)

.env.example, README setup steps, docker-compose files and test fixtures still had prisma://accelerate.prisma-data.net. None of it breaks production, but the next person who clones the repo will set up something that stops working in a few weeks.

6. The client type changes when $extends goes away (1 app, 21 errors)

This one came from running tsc, not from the scan. The ORM 5 app with 19 cacheStrategy calls compiled with zero errors when I dropped only the cache options and kept the extension. Removing $extends(withAccelerate()) as well gave 21 errors, all in code that was already there. One where object was built in a plain const with mode: 'insensitive', so TypeScript widened the value to string. The extended client's types accepted that and the plain client's types don't.

Most of these work fine at runtime. They still fail the build, in files the removal never touched, so leave time for them.

What the fix looked like on real repos

I installed every repo I could, ran prisma generate and tsc --noEmit, applied the checker's --fix, and ran tsc again. 21 projects built here. In 20 of them the fix added no type errors, and in two tsc went from failing to passing (one had an error inside the extension's own type definitions). The 21st is the app above. Reading the patches by hand also turned up a bug: flag ? prisma.$extends(withAccelerate()) : prisma came out as flag ? prisma : prisma. It compiled, but no reviewer would accept it, so the checker now collapses the whole expression to prisma.

I also read two hand-written removal PRs. One large monorepo renamed its CI step (db-generate:no-engine became db-generate), bumped Prisma, renamed a Sentry fingerprint called prisma-accelerate-connectivity, and replaced a type alias PrismaClientWithAccelerate that 52 files used. Nothing breaks if that alias stays, but the name describes something the client no longer does.

A checklist before December 1

  1. Run your type checker before and after the removal, so you can tell old errors from new ones.
  2. Search for everything in the Prisma guide's list: withAccelerate, accelerateUrl, @prisma/extension-accelerate, @prisma/client/edge, cacheStrategy, withAccelerateInfo, $accelerate, --no-engine, --accelerate, --data-proxy, and the Accelerate hostname.
  3. For each edge entry, follow its imports to the client and check what it actually reaches.
  4. Make a per-query decision on every cacheStrategy. Check your load at real traffic before the switch.
  5. Pick the runtime URL (direct for a long-running server, pooled for serverless) and set it everywhere: local, preview, production, CI.
  6. Keep the old Accelerate credential until production is stable, then revoke it.

The checker is open source and runs offline, without a database. It never reads your real .env: github.com/atokim4/prisma-accelerate-exit. npx github:atokim4/prisma-accelerate-exit . prints the list. --diff shows the patch it would make, and it won't remove a cache call unless you pass --drop-cache.

If you only want to see whether a public repo is affected, without installing anything, the same text rules run in the browser at upgrade-check-2026.netlify.app/prisma-accelerate-shutdown. That page also has the date and Prisma's own checklist.

First published on my Hashnode blog. I used AI tools to help with the checker and with editing this post; the scan results were checked by hand.

Top comments (0)