Skip to content

Updated Code for instantiating single PrismaClient instance - #4478

Merged
sabinadams merged 3 commits into
mainfrom
nurul3101-patch-1
Feb 3, 2023
Merged

Updated Code for instantiating single PrismaClient instance#4478
sabinadams merged 3 commits into
mainfrom
nurul3101-patch-1

Conversation

@nurul3101

Copy link
Copy Markdown
Member

Describe this PR

The current code snippet was using outdated NodeJS.Global interface that was removed in Node version 16.
The new snippet is used from our related Help Article for the same topic: https://www.prisma.io/docs/guides/database/troubleshooting-orm/help-articles/nextjs-prisma-client-dev-practices

Changes

Refactored code snippet

What issue does this fix?

Fixes Outdated code snippet that doesn't work in node version > 16

The current code snippet was using outdated NodeJS.Global interface that was removed in Node version 16.
The new snippet is used from our related Help Article for the same topic: https://www.prisma.io/docs/guides/database/troubleshooting-orm/help-articles/nextjs-prisma-client-dev-practices
@nurul3101 nurul3101 self-assigned this Feb 2, 2023
@vercel

vercel Bot commented Feb 2, 2023

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
docs ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 3, 2023 at 6:45AM (UTC)

@github-actions

github-actions Bot commented Feb 2, 2023

Copy link
Copy Markdown
Contributor

This PR changes the following pages (Vercel Preview Deploy links):

Changed Vercel links

(Note that links will only be valid after Vercel preview deploy succeeded)

@sabinadams sabinadams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nurul3101 Overall looked great! Just one question about the logging added to Prisma Client.

@sabinadams sabinadams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@sabinadams
sabinadams merged commit f093106 into main Feb 3, 2023
@sabinadams
sabinadams deleted the nurul3101-patch-1 branch February 3, 2023 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants