TarkyT
tRPC3y ago
8 replies
Tarky

Error while creating a mutation in NextJS

I am having the following error:
"message": "No \"query\"-procedure on path \"checkout.stripe\"",
"code": -32004,


Here is my code:

import { createTRPCRouter, publicProcedure } from "@/server/api/trpc";

export const checkoutRouter = createTRPCRouter({
  stripe: publicProcedure.mutation(() => {
    return "Hello";
  }),
});


If I go to http://localhost:3000/api/trpc/checkout.stripe it throws that error, any ideas?
Was this page helpful?