Credit Default Swap (CDS) spreads exhibit network effects. This paper employs Graph Neural Networks (GNNs) to predict firm CDS spreads by incorporating inter-firm network effects. GNNs treat firms as nodes and idiosyncratic volatility spillover effects as directed edges, effectively capturing the dynamics of inter-firm contagion. Out-of-sample predictions show that GNNs improve prediction accuracy by over 50% compared to classic machine learning algorithms that cannot incorporate inter-firm edge characteristics. We further enhance GNN with node- and edge-attention layers to elucidate its mechanism. These attention layers highlight the importance of specific nodes, including manufacturing and intermediary firms, and crucial edges, such as those between intermediary, retail trade, or information firms and others, in predicting CDS spreads. Our findings enrich CDS pricing models with insightful financial networks and advanced machine learning methodologies.