Skip to content

Commit

Permalink
driver-adapters: Use new planetscale init (#4432)
Browse files Browse the repository at this point in the history
See prisma/prisma#21883
DRIVER_ADAPTERS_BRANCH=fix/planetscale-client
  • Loading branch information
Serhii Tatarintsev authored Nov 10, 2023
1 parent d5d315c commit 0a383f5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { createClient } from '@libsql/client'
import { PrismaLibSQL } from '@prisma/adapter-libsql'

// planetscale dependencies
import { connect as planetscaleConnect } from '@planetscale/database'
import { Client as PlanetscaleClient } from '@planetscale/database'
import { PrismaPlanetScale } from '@prisma/adapter-planetscale'


Expand Down Expand Up @@ -276,12 +276,12 @@ async function planetscaleAdapter(url: string): Promise<DriverAdapter> {
throw new Error("DRIVER_ADAPTER_CONFIG is not defined or empty, but its required for planetscale adapter.");
}

const connection = planetscaleConnect({
const client = new PlanetscaleClient({
url: proxyURL,
fetch,
})

return new PrismaPlanetScale(connection)
return new PrismaPlanetScale(client)
}

main().catch(err)

0 comments on commit 0a383f5

Please sign in to comment.