diff --git a/docs/graphx-programming-guide.md b/docs/graphx-programming-guide.md
index 29d397c3717454f09f0a8238b76a0417bd85478e..226299a7596fc20f66b1b8440250c8c162917ad7 100644
--- a/docs/graphx-programming-guide.md
+++ b/docs/graphx-programming-guide.md
@@ -125,8 +125,10 @@ properties for each vertex and edge.  As a consequence, the graph class contains
 the vertices and edges of the graph:
 
 {% highlight scala %}
-val vertices: VertexRDD[VD]
-val edges: EdgeRDD[ED]
+class Graph[VD, ED] {
+  val vertices: VertexRDD[VD]
+  val edges: EdgeRDD[ED]
+}
 {% endhighlight %}
 
 The classes `VertexRDD[VD]` and `EdgeRDD[ED]` extend and are optimized versions of `RDD[(VertexId,