erquhartE
Convex Community3y ago
6 replies
erquhart

Convex functions that can only be invoked by another function

Maybe this is too niche, but there's a class of functions that I never want to execute directly via cli or the dashboard. They exist solely to be called by other functions.

For example, my migrations typically consist of at least a run mutation and a paginate mutation. That paginate function is truly internal and never to be invoked except by other functions. In this case, only by one specific function.

This blocks nothing and is just a guardrail, but nice for making things explicit. Effectively private vs internal.
Was this page helpful?