How can I type a newline using the LaTeX Graphviz package?

Just create a new line in the label text!

\digraph{contract}{
 rankdir="LR";
 computeSumParam0[label="computeSum:
                         param \#0"];
  }

You can use \noexpand\n, or wrap it in a macro for better clarity:

\documentclass{article}
\usepackage[pdf]{graphviz}

\begin{document}

\digraph{contract}{
    rankdir = "LR";
    computeSumParam0[label = "computeSum: \noexpand\n param \#0"];
}

\end{document}

or

\documentclass{article}
\usepackage[pdf]{graphviz}

\newcommand{\gvnewline}{\noexpand\n}

\begin{document}

\digraph{contract}{
    rankdir = "LR";
    computeSumParam0[label = "computeSum: \gvnewline param \#0"];
}

\end{document}

enter image description here