  Laplacian operators on finite compact metric graphs are considered under the
assumption that matching conditions at graph vertices are of $\delta$ and
$\delta'$ types. An infinite series of trace formulae is obtained which link
together two different quantum graphs under the assumption that their spectra
coincide. The general case of graph Schrodinger operators is also considered,
yielding the first trace formula. Tightness of results obtained under no
additional restrictions on edge lengths is demonstrated by an example. Further
examples are scrutinized when edge lengths are assumed to be rationally
independent. In all but one of these impossibility of isospectral
configurations is ascertained.
