Bug Report: Neon Serverless WebSocket Pooling - Pool doesn't pass connectionString to internal connections
Environment:
@neondatabase/serverless: 1.0.2
@prisma/adapter-neon: 7.0.1
@prisma/client: 7.0.1
Node.js: 25.2.1
OS: Windows
Issue:
When using Pool from @neondatabase/serverless with WebSocket pooling enabled, the Pool constructor accepts a connectionString parameter but does NOT pass it to internal connection clients created by Un.newClient(). This causes all Prisma queries to fail
with:
Error: No database host or connection string was set, and key parameters have default values
(host: localhost, user: Admin, db: Admin, password: null).
Is an environment variable missing?
import { Pool, neonConfig } from '@neondatabase/serverless';
import { PrismaNeon } from '@prisma/adapter-neon';
import ws from 'ws';
neonConfig.webSocketConstructor = ws;
neonConfig.pipelineConnect = 'password';
const pool = new Pool({ connectionString: process.env.DATABASE_URL });
const adapter = new PrismaNeon(pool);
const prisma = new PrismaClient({ adapter });
// Query fails - pool doesn't pass connectionString to internal clients
await prisma.project.create({ data: { name: 'test' } });
Expected: Pool should pass connectionString to all internal WebSocket connection clients.
Actual: Pool creates connections with default localhost parameters, completely ignoring the provided connectionString.
Stack trace:
at kn.connect (node_modules/@neondatabase/serverless/index.mjs:1316:50)
at Un.newClient (node_modules/@neondatabase/serverless/index.mjs:1118:85)
at Un.connect (node_modules/@neondatabase/serverless/index.mjs:1115:1)
at PrismaNeonAdapter.performIO (node_modules/@prisma/adapter-neon/dist/index.mjs:523:40)
The Un.newClient() method creates new connections without inheriting the Pool's connectionString configuration.