The Transformer structures have achieved excellent performances in an increasing number of fields. In the field of natural language processing, the original Transformer structure was used to work on a full connectivity graph, which depicts all connections between words in a phrase. It has been subsequently applied in areas such as computer vision. Recently, many studies have attempted to apply Transformer structures to graph data and achieved good performance. However, it is still a challenge to embedding the structural information of the graph data. To understand the representation of graph data, we employed three distinct ways of embedding the positional and structural information of graph data based on the Transformer structure in this work. To learn the feature representation of the graph data, the encoded structural information and original feature information of the graph data were fed into the Transformer structure. For the learned feature representations, we used them for node classification and graph regression, and then compared and analyzed the three different encoding methods.