If I have something like this:
export const authenticatedQuery = customQuery(
queryRaw, // The base function we're extending
{
args: {
clerkOrgId: v.optional(v.string()),
},
input: async (ctx, args) => {
const { user, workspace, role } = await enhanceAuthenticatedContext(
ctx,
args.clerkOrgId
);
return { ctx: { user, workspace, role }, args: {} };
},
}
);
How do I update it so that I don't get errors when doing this:
export const query = authenticatedQuery({
args: {
...
},
returns: someValidator,
...