In this research, we propose the graph based KNN where a graph is given as input, instead of a numerical vector, as the approach to the text categorization tasks. The ontology which is given as a graph has been used as the popular and standard knowledge representation which is understandable by computers, so it is regarded as more natural scheme to encode texts into graphs, than numerical vectors. In this research, we encode texts into graphs, define the similarity measure between graphs, and modify the K Nearest Neighbor into its graph based version as the text categorization tool. As the benefit from this research, we expect the more compact, graphical, and symbolic representation of texts, than numerical vectors. Therefore, the goal of this research is to implement the text categorization system with the better performance and more user-friendly representations of texts