santi
Explore posts from serversPPrisma
•Created by santi on 10/2/2024 in #help-and-questions
Unexpected message from server
Hi all, we see this error pretty randomly
error in connector: error querying the database: unexpected message from serverI try to replicate with the same query, but the error persists. Is this the kind of error wherein it makes sense to implement some kind of retry logic?
3 replies
PPrisma
•Created by santi on 7/18/2024 in #help-and-questions
unexpected message from server
Hi all, we see this error pretty randomly
error in connector: error querying the database: unexpected message from serverI try to replicate with the same query, but the error persists. Is this the kind of error wherein it makes sense to implement some kind of retry logic?
3 replies
PPrisma
•Created by santi on 5/9/2024 in #help-and-questions
Which is more efficient: Promise.all([findUnique() * 3]) or prisma.$transaction([findUnique() * 3])?
With prisma, is it more efficient to do
OR
Maybe transaction is slower because of transactional integrity? Or is there another command / alternative to $transaction that allows me to make just one trip to the database, rather than many?
Ideally this is about optimizing efficiency/time/being better than Promise.all, and not about transactional integrity
1 replies
Is it possible to get the procedure name / id in middleware?
I want to create a caching middleware that in some routes, stores a cache key that contains the route id (example: catalog.product.findMany) and the input (example: { categories: shirts }). It's not clear to me if this is possible.
8 replies
Create client that is used in every request, without re-creating client
Hi all,
Consider the following
This is annoying in local development because it needs to create the nest app for every request. The same thing with the prisma client.
We'd like to create this once and use in every request. Is this possible?
6 replies
Deno Jupyter Notebook - monorepo support
Hi all! We have a typescript-based monorepo that uses Turbo/Pnpm/etc
Our primary reason for coming across Deno is that it seems to be the best supported way to use Typescript in a Jupyter notebook. We'd like set up a notebooks/ subfolder in the apps/* folder of the project and do queries there
I haven't been able to set this up (maybe due to inexperience with Deno). For example, both of the following commands fail:
I've tried both in the root of the project and in the notebooks/* sub-folder
5 replies
Bug where 2 requests are fired at once. TRPC batches them. Can I cancel the 2nd via ProcedureOption?
Hey all. I have a bug where my app fires two identical requests at the same time. This happens do to some weird upstream auth listener logic. Ideally TRPC can help me mitigate this. I want to configure
ProcedureOption
such that it doesn't batch, but rather only lets the first request to go through. Is this possible?
4 replies