I answer the xref-backed graph questions: module dependency edges, callers and callees, implementors of a named function (with default-arg arities resolved to their defining clause), and call references across loaded applications.
Summary
Functions
I return the modules that mod calls within app.
I return the modules within app that call mod.
I return all call sites of mod.name/arity across loaded applications.
I return all modules that define a function with the given name and
optional arity. Includes def, defp, and macro-generated functions.
I return module-level call edges for an application.
Types
Functions
I return the modules that mod calls within app.
I return the modules within app that call mod.
@spec function_references(module() | nil, atom(), non_neg_integer() | nil) :: [map()]
I return all call sites of mod.name/arity across loaded applications.
Each result has :module (calling module), :function (calling function),
and :arity.
When mod is nil I match callers of name/arity regardless of
target module — used by GT-side C-n when the call is a runtime
variable (builder.text(...), &1.inserted_at) or an unqualified
Kernel/imported function and we can't statically know the target.
@spec implementors(atom(), non_neg_integer() | nil) :: [map()]
I return all modules that define a function with the given name and
optional arity. Includes def, defp, and macro-generated functions.
I return module-level call edges for an application.
Each edge {from, to} means from contains a call to a function
in to. Self-edges are excluded. Only modules whose BEAM files
are on the code path are analyzed.