Fast
Nextjs http endpoint (no prisma)
Personally I think creating an interface and just casting the json result to it would be the cleanest (Would still have to check if the result of the fetch is correct eg status = 200) almost like how you did it in the first snippet
9 replies
Nextjs http endpoint (no prisma)
Trpc has nothing to do with Prisma i would recommend reading this https://trpc.io/docs
And for the endpoint you would have to rewrite it to be defined in the trpc router as a procedure and not a regular nextjs endpoint
9 replies