MeexaM
Convex Community12mo ago
2 replies
Meexa

Returning response from runQuery in a query breaks typescript

As seen in the included images: in the first image I return data from the runQuery and now the entire function and everything in it resolves to any. When I remove the return (or change it to something like return 1) the types work again. I've had this before with actions as well. I think the issue is with runQuery because when I return data I get from ctx.db it works fine.

I guess this is a bug? I can't find anything in the docs that state I shouldn't return data from runQuery. Or is there something else that I might be doing wrong?
Screenshot_2025-02-14_at_12.39.04.png
Screenshot_2025-02-14_at_12.39.18.png
Was this page helpful?