Session-based recommendation, which predicts the user's following interactions by modeling the anonymous user's interaction history, is a challenging sub-direction in recommender systems. Session data is noisy and contains unnecessary items. Currently, the primary solution to reduce noise is to use the attention mechanism, which does not eliminate noise very well, because the attention mechanism is a sort of soft pruning. We propose a novel denoising framework, named DGNN (Denoising Graph Neural Network). Different from soft pruning with the attention mechanism, DGNN implements hard pruning on graph structures, eliminating noise interference more thoroughly. Among DGNN, according to the individual needs of each node in the graph, we propose a scheme that can adaptively adjust the pruning threshold, enabling each node to cope with different degrees of noise. Extensive experiments show that DGNN can beat all baselines and achieves remarkable results on four benchmarks.