Running same query multiple times in a mutation
Is there any downside to running the same query more than once in a mutation?
3 Replies
The same ctx.db.query() call? That's fine
Yeah, our app is just so db heavy that I want to do whatever possible to save resources. Is there any best practice resource for this as ultimately we are optimizing for several factors. function calls, actions, bandwidth etc
If you fetch the same documents, it’s already cached. You won’t incur additional db bandwidth or fetch latency for those records.