Associated to a finite graph $X$ is its quantum automorphism group $G(X)$. We prove a formula of type $G(X*Y)=G(X)*_{\mathrm{w}}G(Y)$, where $*_{\mathrm{w}}$ is a free wreath product. Then we discuss representation theory of free wreath products, with the conjectural formula $\mu(G*_{\mathrm{w}}H)=\mu(G)\boxtimes\mu(H)$, where $\mu$ is the associated spectral measure. This is verified in two situations: one using free probability techniques, the other one using planar algebras.