Hunter
Hunter
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Hunter on 7/27/2023 in #questions
Pattern for Prisma Generated Types are not Serializable
I really just do not want to: Have to define duplicate types that match what prisma generates. Where the only difference is that Date fields are converted to string fields. Are there any work arounds for this? Patterns? Ideas? Or maybe I just need to manage my own types and deal with converting between prisma and custom types. I can do this, I just really do not want to unless there's nothing else.
3 replies
TTCTheo's Typesafe Cult
Created by ibamsey on 3/20/2023 in #questions
<suspense>
Thanks for this response, it makes sense to me. However run into another issue when using Suspense and either useSuspenseQuery or passing the {suspense: true option as you suggested. Error:
Text
Error: This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition.
Text
Error: This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition.
This is the code I've got:
function ReviewList() {
const query = api.strains.getStrain.useQuery(
{
id: 1,
},
{ suspense: true }
);
return (
<>
<h1>Review Page</h1>
<ul>
{query.data?.strain?.Reviews.map((review, index) => (
<li key={index}>{review.comment}</li>
))}
</ul>
</>
);
}
function ReviewList() {
const query = api.strains.getStrain.useQuery(
{
id: 1,
},
{ suspense: true }
);
return (
<>
<h1>Review Page</h1>
<ul>
{query.data?.strain?.Reviews.map((review, index) => (
<li key={index}>{review.comment}</li>
))}
</ul>
</>
);
}
I can't use startTransition since I do not have access to the set method of the trpc hook AFAIK. Which is listed as a limitation in reacts docs
6 replies
WWasp-lang
Created by Hunter on 6/16/2023 in #🙋questions
Does Wasp support MySQL?
Yes my use of planet scale has primarily been with with Prisma.
15 replies
WWasp-lang
Created by Hunter on 6/16/2023 in #🙋questions
Does Wasp support MySQL?
Hey @martinsos, no worries and hope it doesn’t come off the wrong way!
15 replies
WWasp-lang
Created by Hunter on 6/16/2023 in #🙋questions
Does Wasp support MySQL?
Planetscale is a great easy to use and robust service. One that I am familiar with and confident in using. So the thought of having to not use it or learn/use a new external service is a bit disappointing. I totally understand you all having limitations while in beta and thats okay. It does feel like a like a regression or loss of functionality given that Prisma fully supports MySQL. Does that mean that Wasp cron jobs will not work at all with MySQL?
15 replies
WWasp-lang
Created by Hunter on 6/16/2023 in #🙋questions
Does Wasp support MySQL?
Thanks for the response, haven't seen neon yet. I'll take a look at it. Totally understand trying to minimize a testing surface area. It sounds like I could use MySQL if I want still. Nothing in wasp would stop me? Do you mind elaborting on the PgBoss? By jobs do you mean cron jobs?
15 replies
TTCTheo's Typesafe Cult
Created by pach on 5/4/2023 in #questions
"Unsafe assignment of `any` value
Relaoding vscode worked for me too 🤦‍♂️ I'll just throw that 15 minutes into the fire. Thanks for the post
7 replies