Maybe i'm missing something but is it not possible to return data returned from the convex tanstack query mutation wrapper?
export const createDealMutation = mutation({
args: DealsTable.withoutSystemFields,
handler: async (ctx, args) => {
const dealId = await insertDeal(ctx, args)
return dealId
},
})