  We investigate the existence of ground states with prescribed mass for the
focusing nonlinear Schr\"odinger equation with $L^2$-critical power
nonlinearity on noncompact quantum graphs. We prove that, unlike the case of
the real line, for certain classes of graphs there exist ground states with
negative energy for a whole interval of masses. A key role is played by a
thorough analysis of Gagliardo-Nirenberg inequalities and on estimates of the
optimal constants. Most of the techniques are new and suited to the
investigation of variational problems on metric graphs.
