Abstract. Numerical modelling is a reliable tool for flood simulations, but accurate solutions are computationally expensive. In the recent years, researchers have explored data-driven methodologies based on neural networks to overcome this limitation. However, most models are used only for a specific case study and disregard the dynamic evolution of the flood wave. This limits their generalizability to topographies that the model was not trained on and in time-dependent applications. In this paper, we introduce SWE-GNN, a hydraulics-inspired surrogate model based on Graph Neural Networks (GNN) that can be used for rapid spatio-temporal flood modelling. The model exploits the analogy between finite volume methods, used to solve the shallow water equations (SWE), and GNNs. For a computational mesh, we create a graph by considering finite-volume cells as nodes and adjacent cells as connected by edges. The inputs are determined by the topographical properties of the domain and the initial hydraulic conditions. The GNN then determines how fluxes are exchanged between cells via a learned local function. We overcome the time-step constraints by stacking multiple GNN layers, which expand the considered space instead of increasing the time resolution. We also propose a multi-step-ahead loss function along with a curriculum learning strategy to improve the stability and performance. We validate this approach using a dataset of two-dimensional dike breach flood simulations on randomly-generated digital elevation models, generated with a highfidelity numerical solver. The SWE-GNN model predicts the spatio-temporal evolution of the flood for unseen topographies with a mean average error in time of 0.04 m for water depths and 0.004 m2/s for unit discharges. Moreover, it generalizes well to unseen breach locations, bigger domains, and over longer periods of time, outperforming other deep learning models. On top of this, SWE-GNN has a computational speedup of up to two orders of magnitude faster than the numerical solver. Our framework opens the doors to a new approach for replacing numerical solvers in time-sensitive applications with spatially-dependant uncertainties.