Sean Cassiere
Sean Cassiere
Explore posts from servers
DTDrizzle Team
Created by Screw on 1/6/2024 in #help
data is malformed on drizzle-kit V 0.20.10
Same here. Something has changed between 0.20.9 and 0.20.10 which has broken the generate:pg command, where it crashes on the reading of the snapshot files.
13 replies
DTDrizzle Team
Created by Sean Cassiere on 8/23/2023 in #help
Type errors with 0.28.3
Yup that's what I'll be sticking to for now
7 replies
RRailway
Created by Sean Cassiere on 6/17/2023 in #✋|help
Is this memory usage on MySQL normal?
Thanks!
10 replies
RRailway
Created by Sean Cassiere on 6/17/2023 in #✋|help
Is this memory usage on MySQL normal?
Must be friends with Chrome
10 replies
RRailway
Created by Sean Cassiere on 6/17/2023 in #✋|help
Is this memory usage on MySQL normal?
Didn't realise there was such a difference in resource usage between the two DBs
10 replies
RRailway
Created by Sean Cassiere on 6/17/2023 in #✋|help
Is this memory usage on MySQL normal?
I more or less wanted to confirm that I didn't run into a bug or something.
10 replies
RRailway
Created by Sean Cassiere on 6/17/2023 in #✋|help
Is this memory usage on MySQL normal?
For context, as you can see the plugins were idle at the time of taking the screenshots above. Edit: Plus, I'm using Prisma for both projects.
10 replies
TTCTheo's Typesafe Cult
Created by cdodev on 5/10/2023 in #questions
I need a bit of help understanding trpc
The useQuery hook shouldn't be called inside of a useEffect. If you want to called the subsequent requests on the client, you could moove that logic into a child component.
export const Comp = () => {
const { data: posts } = api.posts.getAll.useQuery()
return <div>
{(posts ?? []).map(post => <SubComp key={post.id} postId={post.id} />)}
</div>
}

const SubComp = ({ postId }: { postId: string }) => {
const { data: post } = api.posts.getById.useQuery({ id: postId })

return <div>id: {post?.id}</div>
}
export const Comp = () => {
const { data: posts } = api.posts.getAll.useQuery()
return <div>
{(posts ?? []).map(post => <SubComp key={post.id} postId={post.id} />)}
</div>
}

const SubComp = ({ postId }: { postId: string }) => {
const { data: post } = api.posts.getById.useQuery({ id: postId })

return <div>id: {post?.id}</div>
}
8 replies
TtRPC
Created by Sean Cassiere on 5/8/2023 in #❓-help
Using Response with the Next App Router
Optionally could something like cookies from next/headers be used here?
5 replies
TTCTheo's Typesafe Cult
Created by kevinka on 5/6/2023 in #questions
should I share TRPC client in a internal package?
It's best to export the formed appRouter (plus its typings) and the createContext function. Then, in the server, import the appRouter and the createContext fn, and create the trpc instance on the server. And on the client apps, import the typings for AppRouter and create the trpc-react-query client-api to call the endpoint on the server. The create-t3-turbo repo, is a great reference for this: https://github.com/t3-oss/create-t3-turbo/
3 replies
TTCTheo's Typesafe Cult
Created by Forsto on 1/23/2023 in #questions
Issue with server.msj
This prefix should only be used when it is safe to be exposed to the client-side, and anything specifically for the server should NOT be exposed to the client.
6 replies
TTCTheo's Typesafe Cult
Created by Forsto on 1/23/2023 in #questions
Issue with server.msj
It should be like
AWS_ACCESS_KEY_ID=key
AWS_SECRET_ACCESS_KEY=key
AWS_ACCESS_KEY_ID=key
AWS_SECRET_ACCESS_KEY=key
6 replies
TTCTheo's Typesafe Cult
Created by Forsto on 1/23/2023 in #questions
Issue with server.msj
Remove the NEXT_PUBLIC_ prefix
6 replies
TTCTheo's Typesafe Cult
Created by cyremur on 1/19/2023 in #questions
Can I zod this gamestate?
const GameSchema = z.object({
id: z.string(),
status: z.enum("initializing","waitingOpponent","started","finished"),
field: // your zod schema for this,
entities: z.array(/** you zod schema for this */),
initiative: z.array(z.number()),
round: z.number(),
turn: z.number(),
hands: z.array(z.array(/** you zod schema for this */)),
decks: z.array(/** you zod schema for this */)
});

export type TGameSchema = z.infer<typeof GameSchema>
const GameSchema = z.object({
id: z.string(),
status: z.enum("initializing","waitingOpponent","started","finished"),
field: // your zod schema for this,
entities: z.array(/** you zod schema for this */),
initiative: z.array(z.number()),
round: z.number(),
turn: z.number(),
hands: z.array(z.array(/** you zod schema for this */)),
decks: z.array(/** you zod schema for this */)
});

export type TGameSchema = z.infer<typeof GameSchema>
6 replies
TTCTheo's Typesafe Cult
Created by Xaohs on 1/5/2023 in #questions
How to check if type is array?
Cannot say for certain TBH. What I do know is that in my version of it, I'm directly passing the value into the Array.isArray vs accessing the reference of it on the object outside of the context of the .forEach.
13 replies