-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
ctx and Prisma instance question #8
Comments
@brikou the reason is, that when you want to use the Dataloader with full Cache later, you don't need to change your code. So this basically means, that on each request, a new Client instance is created. It's not used right now, but will later help to enable caching on a request basis. Does this answer your question? |
Ok I see but since cache is not used, we should remove it. Then add an example with this cache feature. Thanks for your insight. |
The intention of this is to establish patterns we think will help for working with Prisma. By attaching the Prisma within context, we establish a pattern for your code that can take advantage of caching once we enable that feature. When we release it people can take advantage of it for free. By all means though import Prisma in your own files if it makes sense for you |
Thanks @abhiaiyer91, can't wait to see the cache feature coming |
Hi great repo, 1.17 looks fantastic!
I have a real question: why do you attach prisma to context instead of doing a regular import of the instance?
The text was updated successfully, but these errors were encountered: