i intent to create the command \graphEdge to streamline drawing graphs edges, it would take a list of arguments separated by , the function would then divide the arguments and iterate on it, creating a new \draw for each minus the last one.
On the mwe there is some very rough idea of the function implementation, and an example of usage.
MWE
\documentclass{standalone}
\usepackage{xparse}
\usepackage{tikz}
\NewDocumentCommand\graphEdge{
s % #1 - dashed
> {\SplitList{,}}
o % #2 - position options
> {\SplitList{,}}
o % #3 - draw options
>{\SplitList{,}}
m % #4 - annotations
>{\SplitList{,}}
m % #5 - nodes
}{
% i = interator
\IfValueT{#5[i+1]}{
\draw[->,\IfBooleanT{#1}{dashed,}\IfValueT{#3[i]}{#3[i]}]%
(#5[i]-x) --node[sloped,\IfValueTF{#2[i]}{#2[i]}{above}] {\(#4[i]\)}%
(#5[i+1]-x);
}
}
\begin{document}
\begin{tikzpicture}
% ======================= Nodes ====================== %
% 1,2,3
\node (1-x) at (0, 0) {1};
\node (2-x) at (1, 1) {2};
\node (3-x) at (2, 1) {3};
\node (4-x) at (1,-1) {4};
% ======================= Edges ====================== %
% \graphEdge{A,B}{1,2,3}
\draw[->] (1-x) --node[sloped,above]{\(A\)} (2-x);
\draw[->] (2-x) --node[sloped,above]{\(B\)} (3-x);
% \graphEdge*{C,D}{1,4,3}
\draw[->,dashed] (1-x) --node[sloped,above]{\(C\)} (4-x);
\draw[->,dashed] (4-x) --node[sloped,above]{\(D\)} (3-x);
\end{tikzpicture}
\end{document}

\graphEdge{[below]A, [above]B}{1, 2, 3}nicer? With thegraphslibrary you can just dograph[use existing nodes] {1 ->["A"] 2 ->["B"'] 3}and you see directly which node is placed along which edge. – Qrrbrbirlbel Jun 09 '23 at 16:53