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);
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)
1 Reply
if i try
queryWikiTable({ ctx, input })
the error is
is missing the following properties from type 'ProcedureCallOptions<unknown>': getRawInput, path, typets(2345)
is missing the following properties from type 'ProcedureCallOptions<unknown>': getRawInput, path, typets(2345)