customQuery + type errors
is this supposed to happen when definiting custom functions? I have a separate file I want all my other mutations/queries to use to check auth before every request, but the moment I try exporting the custom function variable, convex throws a type error:
1 Reply
this is unexpected. I suspect you're defining this in the same file that you're exporting other functions from - is that the case?
The most frequent issue is when a file uses
internal
and also exports functions. In this case, some function is depending on the custom query. and maybe the rlsRules is depending on internal?
So it'd be something like internal
-> someFile
-> customQuery
-> internal
. Where when it's not exported, the type of someFile
isn't depending on customQuery
btw @Clever Tagline you can use customCtx
in any customQuery/Mutation/Action, and all of them also support input/args - the docs aren't very instructive here