Although data-driven methods have been widely used in planetary gearbox fault diagnosis, the difficulty and high cost of manual labeling leads to little labeled training data, which limits the classification performance of traditional data-driven methods. Therefore, the semi-supervised fault diagnosis method with few labeled samples becomes one of the main research directions. Graph attention network (GAT) is distinguished from traditional classification network by using graph structure for fault node information aggregation and feature extraction, which is an effective semi-supervised learning algorithm. This paper uses fast Fourier transform to process the original vibration signal of gearbox and use it as graph nodes, and propose a KNN graph construction method using pooling for fuzzy distance calculation. In addition, this paper improves the distribution of attention weights by introducing dynamic graph attention networks to correct the problem that classical static GATs cannot clearly distinguish the weights of different categories of nodes. Experiments show that the method proposed in this paper can better extract fault features in complex gearbox vibration signals with an accuracy of more than 99% with very few labeled samples, and has better diagnostic performance compared with other graph neural network architectures and traditional classification networks.