kstulgysK
tRPC3y ago
9 replies
kstulgys

Why webhooks does not work with TRPC?

I have a what suppose to be a webhook:

  deposit: publicProcedure.input(z.any()).mutation(async ({ ctx, input }) => {
    console.log(input);
    return { input };
  }),


When I POST to this endpoint it responds with:

{
  "result": {
    "data": {
      "json": {
        "input": null
      },
      "meta": {
        "values": {
          "input": [
            "undefined"
          ]
        }
      }
    }
  }
}


Why?
console logs undefined on the server.
Was this page helpful?