tRPCttRPC
Powered by
chicoC
tRPC•2y ago•
2 replies
chico

How do you call a router procedure from another router procedure?

.query(async ({ ctx, input }) => {
      const wikiQuery = await routerFromAnotherFile.queryWikiTable(input);
.query(async ({ ctx, input }) => {
      const wikiQuery = await routerFromAnotherFile.queryWikiTable(input);


error
Argument of type '{ similar?: boolean | undefined; keyword?: string | undefined; limit?: number | undefined; sortBy?: string | undefined; } | undefined' is not assignable to parameter of type 'ProcedureCallOptions<unknown>'.
  Type 'undefined' is not assignable to type 'ProcedureCallOptions<unknown>'.ts(2345)
Argument of type '{ similar?: boolean | undefined; keyword?: string | undefined; limit?: number | undefined; sortBy?: string | undefined; } | undefined' is not assignable to parameter of type 'ProcedureCallOptions<unknown>'.
  Type 'undefined' is not assignable to type 'ProcedureCallOptions<unknown>'.ts(2345)
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

What do you call the function that is used by a procedure?
FulcanoFFulcano / ❓-help
10mo ago
Is it possible to call one procedure in another?
TaylorFayTTaylorFay / ❓-help
4y ago