ampp
ampp5d ago

Acceptable circular reference counts?

Currently within convex i have 20 circular references with 14 that appear with a _generated/api.d.ts (34 total).. Do the references related to api.d.ts have the potential to cause problems? I still have some refactor ptsd after having to redesign a lot to get it down from over 60 in october. Its not easy to tell where the tipping point is until stuff breaks and it can get very weird. Its also been keeping me from redesigning the final execution part of our event system for easier use. The biggest issue right now is composing events, as a event can spawn sub-events within the same mutation (within any ts function atm) and one simple hack is to use the new sub-mutations via ctx.runMutation which will break the chain. I'm just really unclear about the performance downsides, or other issues. Especially since i haven't hardly seen them mentioned, it feels like a cheap hack..
1 Reply
Convex Bot
Convex Bot5d ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!