Machine learning and deep learning have long been prominent choices in the scientific research community and practical applications as effective approaches to combat Structured Query Language (SQL) injection attacks. In this study, we proposed a novel graph convolution based on nonlocal network named Refined Highway Modul (RHM) for SQL injection. Initially, we develop a procedure to transform SQL queries into a graph structure based on SQL indentation to maximize the exploitation of relationships between information blocks. A crucial component of the proposed model is a modified version of the non-local network with a graph convolutional layer, referred to as the refined highway module, enabling direct processing of graphic data. By focusing on the relationships between components in SQL statements, this model is expected to efficiently support the classification of SQL injections. Paticular, SQL statements are restructured into graphs, leveraging information propagation mechanisms to disseminate information to neighboring nodes before mapping feature relationships at the overall graph level. To demonstrate the efficacy of the proposed model, we compare it with a traditional non-local module under the same conditions. Experimental results indicate that our model utilizing a graph structure achieves superior performance across all evaluation metrics compared to the original one, with an accuracy of 99.91%, the best of our knowledge. Thus, the suggested model for safeguarding against SQL injection attacks can prevent potentially severe consequences.