I am using Igraph package in R and when I am accessing the list of vertices names through V(graph), I am getting the following result:
Vertex sequence: [1]
For a more general case, just use the as_ids() function.
as_ids()