With the increase in online content, recommendation systems have become an important tool to filter information overload and provide users with personalized experiences. Collaborative filtering is a classical recommendation technique that represents users and items as vectors. However, recent studies have shown that item attributes, represented as a Knowledge Graph (KG), can provide rich auxiliary information for recommendation systems. This paper proposes a Graph Neural Network (GNN) based on KGs to improve the accuracy, diversity, and interpretability of recommendation systems. The GNN fuses semantic related information in KG to achieve user as well as item representation habits. Neighboring nodes have different weights, which can be aggregated to obtain a more accurate representation of the current entity and improve the accuracy of recommendations. The learning process can be extended to more contents related to user interests, which can improve the diversity of recommendations. This paper proposes a graph neural network based on knowledge graphs, fusing semantic related information in KG to achieve user as well as item representation habits. Neighboring nodes have different weights, which can be aggregated to obtain a more accurate representation of the current entity and improve the accuracy of recommendations. Due to the influence of user preferences, the learning process can be extended to more contents related to user interests, which can improve the diversity of recommendations.