Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
2 replies
Forsto

tRPC invalid_type error with Clerk

Hi, I have this weird issue I've been trying to resolve for a while now.

This is the error in browser console.

Here is my back-end endpoint:
findOrganisation: publicProcedure
    .input(z.string())
    .query(async ({ ctx, input }) => {
      return ctx.prisma.organisation.findFirst({
        where: {
          url: input,
        },
      });
    }),


and this is how I call it:
  const { data: label } = api.demo.findOrganisation.useQuery("wall");
image.png
Was this page helpful?