• Resolve the effective recursion depth for a query.

    • Explicit maxRecursion lower than include tree depth → throw (silent truncation is no longer allowed).
    • Explicit maxRecursion ≥ selection depth → use it.
    • No explicit maxRecursion but an include tree → honour the selection depth.
    • Neither → fall back to defaultMaxRecursion (historically 4).

    Parameters

    • args: {
          defaultMaxRecursion?: number;
          include?: Record<string, IncludeTree>;
          maxRecursion?: number;
      }

    Returns number