We propose a new model that describes the dynamics of epidemic spreading on connected graphs. Our model consists in a PDE-ODE system where at each vertex of the graph we have a standard SIR model and connexions between vertices are given by heat equations on the edges supplemented with Robin like boundary conditions at the vertices modeling exchanges between incident edges and the associated vertex. We describe the main properties of the system, and also derive the final total population of infected individuals. We present a semi-implicit in time numerical scheme based on finite differences in space which preserves the main properties of the continuous model such as the uniqueness and positivity of solutions and the conservation of the total population. We also illustrate our results with a selection of numerical simulations for a selection of connected graphs.