We are going to present solution of the inverse problem for quantum graphs --Schr\"odinger operators on metric graphs. The set of spectral data consists essentially of the matrix analog of Titchmarsh-Weyl $M$-function associated with graph's boundary and depends on the magnetic fluxes through the cycles. Solution to the problem is obtained by combining {\bf peeling} of edges with {\bf breaking} of cycles. The method is based on detailed analysis of invisible eigenfunctions -- those eigenfunctions that cannot be detected from the boundary observations.