Skip to content

Add support for Prisma 7 #3525

@bizob2828

Description

@bizob2828

Description

It looks like quite a few changes have occurred in Prisma 7. The notable changes we'll have to figure out:

  1. Rust-free Prisma Client as the default(does that mean we can actually get the underlying SQL being executed?)
  2. Generated Client and types move out of node_modules(we've had a few asks about instrumenting the generated prisma Support Prisma instrumentation to a custom generated path #3394. We rely on the import/require path which doesn't work with an arbitrary generated path)
  3. Our current test setup doesn't work because we have url in the schema. This has to go in a new prisma.config.js which requires you have prisma package. We currently only install @prisma/client

I tried to get the existing tests working but got

  TypeError: Cannot read properties of undefined (reading '__internal')
      at new t (/Users/revans/code/pull-requests/node-newrelic/test/versioned/prisma/generated/prisma/runtime/client.js:74:952)
      at TestContext.<anonymous> (/Users/revans/code/pull-requests/node-newrelic/test/versioned/prisma/prisma.test.js:27:18)
      at TestHook.runInAsyncScope (node:async_hooks:214:14)
      at TestHook.run (node:internal/test_runner/test:1106:25)
      at TestHook.run (node:internal/test_runner/test:1427:18)
      at Test.runHook (node:internal/test_runner/test:1024:20)
      at Test.run (node:internal/test_runner/test:1081:27)
      at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
      at async startSubtestAfterBootstrap (node:internal/test_runner/harness:358:3)

I think we need to take a step back and figure out the best way to support our customers using prisma. Also look into the non rust client to see if we can get more observability from it, and lastly update our tests to work across all suppported versions

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Triage Needed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions