We consider the Dirichlet Laplacian in a waveguide of uniform width and infinite length which is ideally divided into three parts: a "vertex region", compactly supported and with non zero curvature, and two "edge regions" which are semi-infinite straight strips. We make the waveguide collapse onto a graph by squeezing the edge regions to half-lines and the vertex region to a point. In a setting in which the ratio between the width of the waveguide and the longitudinal extension of the vertex region goes to zero, we prove the convergence of the operator to a selfadjoint realization of the Laplacian on a two edged graph. In the limit operator, the boundary conditions in the vertex depend on the spectral properties of an effective one dimensional Hamiltonian associated to the vertex region.