Mattèo
Explore posts from serversPPrisma
•Created by Mattèo on 10/31/2024 in #help-and-questions
How to use set a relation and update in the same time rows
Hey ! I wanted to know if someone know how to achieve this :
Has anyone had this problem before, or can anyone help me?
Wishing you a good day 😉
2 replies
PPrisma
•Created by Mattèo on 7/19/2024 in #help-and-questions
Slowness issue when using Supavisor connection pooling with Prisma
Hey Prisma community, I've set up Supabase Supavisor connection pooling on my Supabase project but it turns out that the request is abnormally slow with Prisma when I use supavisor. I compared the time it took to make a request with
console.time
and the result was clear.
The tests are done locally with a remote postgres database hosted on Supabase with Supavisor enabled. I have the latest version of Prisma installed
Here is my connection string in my .env
With Supavisor : 291.246ms
Without Supavisor (same connection string in DATABASE_URL
and DIRECT_DATABASE_URL
) : 52.009ms
Does someone can help me ?
Have a nice day😉2 replies
Can I perform react query queries without using a trpc procedure, using useQuery standalone
Hey, I need to perform a client site request, and I can't implement it with TRPC, so can I use regular useQuery method in my Next.js app ? Will the useQuery will be attached to the React Query context of TRPC ?
2 replies
TTCTheo's Typesafe Cult
•Created by Mattèo on 1/16/2024 in #questions
How to authenticate users on a dynamic sudomain (next-auth)
Hey ! Hope you're doing well, I'm working on a project and I try to implement authentication on multiple domain with next-auth and Next.js Pages router. Here is a basic schema :
- app.localhost:3000 (Admin only subdomain for managing the app, authentication needed)
- [tenant].localhost:3000 (Authentication needed here using next-auth)
Can someone help me with this. Currently, I got it working but I can't access session while i'm calling useSession from
[tenant].localhost:3000
. My NEXTAUTH_URL
is http://app.localhost:30005 replies
How to handle Query Errors on client side (show toast on 401)
Hey ! Hope you're doing well ! I wanted to know if someone can explain to me how to handle errors on the client (using Next.js).
I need to handle UNAUTHENTICATED error on client because when a user tries to access a resource I want to display a feedback toast.
Thanks 🙏
3 replies
How to execute command on a deployment ?
Hey ! I wanted to know how to execute a command on a deployed service, I have small script in my project to initialize an admin account, but this script needs to be executed with a started service. Is it possible to connect with SSH to an instance, or to execute a command after starts of a service ?
Bye
7 replies
TTCTheo's Typesafe Cult
•Created by Mattèo on 3/6/2023 in #questions
Best ways to render a React component conditionally with Next (based on build time conditions)
1 replies
TTCTheo's Typesafe Cult
•Created by Mattèo on 3/6/2023 in #questions
How to use react-query with the create-t3-app starter (non-TRPC call) ?
Hey ! I wanted to know if someone know how to use react-query with the create-t3-app starter. The starter seems to use react-query but there is no QueryClientProvider in the _app.tsx.
6 replies
TTCTheo's Typesafe Cult
•Created by Mattèo on 3/3/2023 in #questions
What are the best ways to use TRPC procedures in getStaticProps ?
I wanted to know how can I use procedures made on my router from getStaticProps method
3 replies