TheCyberverseT
Convex Community2y ago
8 replies
TheCyberverse

userQuery is not a function

I created a convex custom helper, but whenever I try to use it, it returns this error in the image:
Here is my code for the custom Helper:
export const userQuery = customQuery(
query,
customCtx(async (ctx) => {
return {
userId: await getUserId(ctx)
};
})
);
And where I use it:
export const getUser = userQuery({
args: {},
async handler(ctx) {
return await ctx.db.get(ctx.userId as Id<'users'>);
}
});
here is the github repo where the issue is:
https://github.com/Cyberverse2/squid
Screenshot_2024-03-11_044001.png
GitHub
Contribute to CyberVerse2/squid development by creating an account on GitHub.
GitHub - CyberVerse2/squid
Was this page helpful?