hocinoH
Convex Community15mo ago
8 replies
hocino

CustomFunctions, vitest and multiple query call in a query

Hi everyone,

I'm struggling on a test. Vitest throw an error as below :

 ❯ Module.checkIfAuthorizedToCreateObject convex/validator.ts:9:15
      7|   ctx: GenericMutationCtx<DataModel>
      8| ) => {
      9|   const sub = await ctx.runQuery(api.subscriptions.getSubscriptionInformation)
       |               ^


{
  stack: 'Error: \n' +
    '    at performAsyncSyscall \n' +
    '    at runUdf \n' +


It's a query which is called inside a query (customQuery). I don't understand why, there are some limitations with vitest when we use custom functions or when we call queries in a query ?

thank you
Was this page helpful?