[Tex/LaTex] How to get a wavy arrow for an edge

tikz-pgf

What option do I need to get a wavy arrow between two points:

\documentclass{article}
\usepackage{tikz}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{mathrsfs}
\usepackage{textcomp}
\usetikzlibrary{arrows}
\usetikzlibrary{decorations.pathmorphing}
\pagenumbering{gobble}
\begin{document}
\centering 

\vfill

\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,
  thick,main node/.style={circle,fill=#1!0,draw,font=\sffamily\Large\bfseries}]

\node[main node=black] (1) {a};
\node[main node=black](2)[right of=1]{b};

  \path[every node/.style={font=\sffamily\small}]
    (1) edge[<<<WAVY ARROW OPTION>>>, very thick, color=blue] node [] {} (2)
   ;

\end{tikzpicture}
\end{document}

I assume the fix is an easy option where I've put <<<WAVY ARROW OPTION>>>.

Best Answer

enter image description here

\documentclass[tikz, border=3mm]{standalone}
\usetikzlibrary{arrows, decorations.pathmorphing}

\begin{document}
\centering
\begin{tikzpicture}[
        ->,    > = stealth',
       shorten > = 1pt,auto,
   node distance = 3cm,
      decoration = {snake,   % <-- added
                    pre length=3pt,post length=7pt,% <-- for better looking of arrow,
                    },
main node/.style = {circle,draw,fill=#1,
                    font=\sffamily\Large\bfseries},
                    ]
\node[main node=black]  (1)     {a};
\node[main node=black]  (2) [right of=1]{b};

\path[draw=blue, very thick, decorate] (1) -- node[above] {?} (2);
\draw[red] (1) -- node[below] {straight line} (2);
\end{tikzpicture}
\end{document}

In your MWE I consider only for image necessary packages, i.e. only TikZ libraries. For better looking of arrow I add "complications" which make begin and end of arrow straight.

Edit: decoration is activated only on path with option decorate. Consequently red line (note: \draw is shorthand for \path[draw]), which does not have the option decorate.