.traevelliath
.traevelliath
Explore posts from servers
TTCTheo's Typesafe Cult
Created by .traevelliath on 7/31/2023 in #questions
Prisma enum causes maximum call stack size exceeded.
4 replies
TTCTheo's Typesafe Cult
Created by .traevelliath on 7/7/2023 in #questions
Update userId which is used for defining relationships between models
Hey. I’ve got in the situation where I need to replace userIds of a user, that define many relationships, like student-to-teacher, teacher-to-students, students-to-lessons. Obviously, I tried the most forward way of just looking for specific userId across the tables and having it replaced with the new one, but prisma quickly throws an error signifying that I try to push changes that would violate above-mentioned relationships. Any guidance will be really appreciated.
4 replies
TTCTheo's Typesafe Cult
Created by .traevelliath on 6/28/2023 in #questions
how to get rid of t3 icon in Head component?
I mean, it's a good icon, but I'd like to have my own in place. I have <link rel='icon' href='/my-icon.svg' /> under <Head> in app.tsx, but: For example, when I open deployed project address, for a split second there is t3 icon. And if I open the same site from my phone, I don't see my icon at all, only t3 one.
3 replies
TTCTheo's Typesafe Cult
Created by .traevelliath on 6/22/2023 in #questions
Prisma 2-3 levels deep queries
Hey, I'm building an app, where I need to get "friends of friends" data. Like for example, I query "target" user friends first and get a list of user IDs. Then I need to query every user ID in that list and get the same structured list, but of all the friends of friends combined. How can I do this?
17 replies
TTCTheo's Typesafe Cult
Created by .traevelliath on 6/14/2023 in #questions
Prisma query multiple tables
7 replies
TtRPC
Created by .traevelliath on 6/14/2023 in #❓-help
prefetch() within getServerSideProps does not provide data upon manual refreshing
Within getServerSideProps: await ssh.user.getDepositInfo.prefetch(userId); await ssh.user.getFQOperationHistory.prefetch(userId); return { props: { trpcState: ssh.dehydrate(), } }; When I'm trying to use useContext() queries in a component, initially data is flowing, but when I force refresh ( command + R ), data is undefined at first, then populated. const utils = api.useContext(); const data = utils.user.getDepositInfo.getData(user?.id); //undefined const list = utils.user.getFQOperationHistory.getData(user?.id); //undefined Is there something I'm doing wrong? How do I get around it?
1 replies