chico
chico4mo ago

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)
1 Reply
chico
chico4mo ago
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)