Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify implementation for Prisma Client #5886

Closed
wants to merge 1 commit into from

Conversation

DilwoarH
Copy link

@DilwoarH DilwoarH commented Nov 25, 2022

NOTE:

  • It's a good idea to open an issue first to discuss potential changes.
  • Please make sure that you are NOT opening a PR to fix a potential security vulnerability. Instead, please follow the Security guidelines to disclose the issue to us confidentially.

☕️ Reasoning

The current implementation is quite complex and unnecessary for beginners.

This alternative solution simplifies the implementation and removes the need for a separate client file.

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

Please scout and link issues that might be solved by this PR.

Fixes: INSERT_ISSUE_LINK_HERE

📌 Resources

The current implementation is quite complex and unnecessary. This alternative implementation simplifies the implementation and removes the need for a separate client file.
@vercel
Copy link

vercel bot commented Nov 25, 2022

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

Name Status Preview Updated
next-auth ✅ Ready (Inspect) Visit Preview Nov 25, 2022 at 1:39AM (UTC)

@vercel vercel bot temporarily deployed to Preview November 25, 2022 01:39 Inactive
@ndom91
Copy link
Member

ndom91 commented Nov 27, 2022

The separate client file and the logic within is necessary for development purposes though. Otherwise new prisma instances get created unnecessarily all the time.

See: https://www.prisma.io/docs/guides/database/troubleshooting-orm/help-articles/nextjs-prisma-client-dev-practices#solution

@ndom91 ndom91 closed this Nov 27, 2022
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.

None yet

2 participants