yourny🤫🧏🏼
yourny🤫🧏🏼
Explore posts from servers
TTCTheo's Typesafe Cult
Created by yourny🤫🧏🏼 on 11/18/2023 in #questions
function called on focus
https://pastebin.com/3DjUHxUR Hi, can somebody tell me why wakeUp.useQuery() function is called when I change page, even if I haven't wrote the command?
3 replies
TTCTheo's Typesafe Cult
Created by yourny🤫🧏🏼 on 11/14/2023 in #questions
tRPC Problem
No description
3 replies
TTCTheo's Typesafe Cult
Created by yourny🤫🧏🏼 on 11/10/2023 in #questions
Planetscale alternative
Since PlanetScale as of now requires you to put in a credit card (even to use their free service), do you know of any other sites that work the same way?
11 replies
TTCTheo's Typesafe Cult
Created by yourny🤫🧏🏼 on 8/7/2023 in #questions
the URL must start with file:
17 replies
TTCTheo's Typesafe Cult
Created by yourny🤫🧏🏼 on 8/7/2023 in #questions
Import error
How can I import useMutation()?
5 replies
TTCTheo's Typesafe Cult
Created by yourny🤫🧏🏼 on 5/10/2023 in #questions
'Component' cannot be used as a JSX component.
32 replies
TTCTheo's Typesafe Cult
Created by yourny🤫🧏🏼 on 4/26/2023 in #questions
Router triggered 2 times
2 replies
TTCTheo's Typesafe Cult
Created by yourny🤫🧏🏼 on 4/26/2023 in #questions
Unhandled Runtime Error
13 replies
TTCTheo's Typesafe Cult
Created by yourny🤫🧏🏼 on 4/25/2023 in #questions
Rendered more hooks than during the previous render.
14 replies
TTCTheo's Typesafe Cult
Created by yourny🤫🧏🏼 on 4/25/2023 in #questions
Eslint problem
3 replies
TTCTheo's Typesafe Cult
Created by yourny🤫🧏🏼 on 4/25/2023 in #questions
Error on Router
import { createTRPCRouter, publicProcedure } from "~/server/api/trpc";
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();

export const postsCreateUser = createTRPCRouter({
checkUser: publicProcedure.query(async (userEmail) => {
const user = await prisma.users.create({
data: {
email: userEmail,
},
});
return user;
}),
});
import { createTRPCRouter, publicProcedure } from "~/server/api/trpc";
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();

export const postsCreateUser = createTRPCRouter({
checkUser: publicProcedure.query(async (userEmail) => {
const user = await prisma.users.create({
data: {
email: userEmail,
},
});
return user;
}),
});
Type 'ResolveOptions<{ _config: RootConfig<{ ctx: { prisma: PrismaClient<PrismaClientOptions, never, RejectOnNotFound | RejectPerOperation | undefined>; }; meta: object; errorShape: { ...; }; transformer: typeof SuperJSON; }>; ... 5 more ...; _meta: object; }>' is not assignable to type 'string'.ts(2322)
index.d.ts(1825, 5): The expected type comes from property 'email' which is declared here on type '(Without<UsersCreateInput, UsersUncheckedCreateInput> & UsersUncheckedCreateInput) | (Without<...> & UsersCreateInput)'
Type 'ResolveOptions<{ _config: RootConfig<{ ctx: { prisma: PrismaClient<PrismaClientOptions, never, RejectOnNotFound | RejectPerOperation | undefined>; }; meta: object; errorShape: { ...; }; transformer: typeof SuperJSON; }>; ... 5 more ...; _meta: object; }>' is not assignable to type 'string'.ts(2322)
index.d.ts(1825, 5): The expected type comes from property 'email' which is declared here on type '(Without<UsersCreateInput, UsersUncheckedCreateInput> & UsersUncheckedCreateInput) | (Without<...> & UsersCreateInput)'
Why am I getting this? Using tRPC
11 replies