Mendy
Mendy
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Mendy on 8/7/2023 in #questions
How to import images in NextJS and t3-turbo?
I solved it. In prod/dev envs, this is not an issue because as soon as you run dev nextjs will generate a next-env.d.ts file for you, that will have this line:
/// <reference types="next/image-types/global" />
/// <reference types="next/image-types/global" />
The problem pops up when you check the types in CI, since next-env.d.ts is present in .gitignore, the types are not impoerted and you get this error. I'm not familiar with the t3 CI pipeline, if there's any provided, but in create-t3-turbo this causes a failure. So to solve it, I just needed to remove next-env.d.ts from .gitignore, it works fine now.
2 replies
TTCTheo's Typesafe Cult
Created by Mendy on 6/6/2023 in #questions
NextJS build Fails Only In CI - Can't find module
🆙
3 replies
TTCTheo's Typesafe Cult
Created by Lopen on 6/5/2023 in #questions
drizzle orm is overhyped
Yes, cold starts and edge are the main selling points, but Drizzle will speed up your queries in any env - especially with db like PlanetScale.
68 replies
TTCTheo's Typesafe Cult
Created by Lopen on 6/5/2023 in #questions
drizzle orm is overhyped
Drizzle has a long way to go, agreed. Dose it worth the pain? YES! I was using Prisma for a db with 30 tables. To simply get the context for the user, it created 4 different queries. Each request would take more then a second just to get the context. With Drizzle using prepared statement, this is down to 60ms. I'm not hyped, just practical.
68 replies
TTCTheo's Typesafe Cult
Created by kevinka on 5/6/2023 in #questions
Library recommendation for Authentication on React?
No, expect for iron session
19 replies
TTCTheo's Typesafe Cult
Created by abcdef on 5/3/2023 in #questions
Prisma schema question
Aggregating the data every time is definitely easier to handle then keeping the balance up to date. But it won’t save you from having to think about acid transactions. For example: While you fetch your groupby query, another query is updating a new transaction, or modifying an existing one etc, the data returned by the groupby query is not up to date and you might make the wrong decision. This apply even when doing it all in the same transaction, if it’s not serialized
12 replies
TTCTheo's Typesafe Cult
Created by abcdef on 5/3/2023 in #questions
Prisma schema question
12 replies
TTCTheo's Typesafe Cult
Created by abcdef on 5/3/2023 in #questions
Prisma schema question
There are multiple types of transactions, I read your link for a bit, there are some scenarios that you have to take extra steps to ensure the transaction safety - with prisma. Great resource tho. @abcdef you should probably read that.
12 replies
TTCTheo's Typesafe Cult
Created by Mendy on 5/3/2023 in #questions
My DB shouldn’t be this slow, RIGHT❓
Thank you so much for your help!!! @Sybatron @bostonsheraff
33 replies
TTCTheo's Typesafe Cult
Created by Mendy on 5/3/2023 in #questions
My DB shouldn’t be this slow, RIGHT❓
Got it 👍
33 replies
TTCTheo's Typesafe Cult
Created by Mendy on 5/3/2023 in #questions
My DB shouldn’t be this slow, RIGHT❓
Still 2-3 sec for a simple query on an empty db seems like a lot
33 replies
TTCTheo's Typesafe Cult
Created by Mendy on 5/3/2023 in #questions
My DB shouldn’t be this slow, RIGHT❓
33 replies
TTCTheo's Typesafe Cult
Created by Mendy on 5/3/2023 in #questions
My DB shouldn’t be this slow, RIGHT❓
Thank you, when reading the blog post I must’ve confused those two.
33 replies
TTCTheo's Typesafe Cult
Created by Mendy on 5/3/2023 in #questions
My DB shouldn’t be this slow, RIGHT❓
33 replies
TTCTheo's Typesafe Cult
Created by Mendy on 5/3/2023 in #questions
My DB shouldn’t be this slow, RIGHT❓
I changed absolutely nothing but I see only 3s now.
33 replies
TTCTheo's Typesafe Cult
Created by Mendy on 5/3/2023 in #questions
My DB shouldn’t be this slow, RIGHT❓
JsonProtocol is just for Postgres (for now) no?
33 replies
TTCTheo's Typesafe Cult
Created by Mendy on 5/3/2023 in #questions
My DB shouldn’t be this slow, RIGHT❓
You’re right, will change now. I remember checking this…
33 replies
TTCTheo's Typesafe Cult
Created by Mendy on 5/3/2023 in #questions
My DB shouldn’t be this slow, RIGHT❓
But since the only think talking with the db is me from my local setup, the latency shouldn’t be an issue. It’s still relatively close to me.
33 replies
TTCTheo's Typesafe Cult
Created by Mendy on 5/3/2023 in #questions
My DB shouldn’t be this slow, RIGHT❓
The server will also be in London, it’s the closest region to Israel that Planetscale, Varcel, and Firebase (I’m using it for auth) offers.
33 replies
TTCTheo's Typesafe Cult
Created by Mendy on 5/3/2023 in #questions
My DB shouldn’t be this slow, RIGHT❓
I will try to query the db tomorrow using raw sql ams without prisma, and report if I see better performance.
33 replies