diff --git a/haphviz.cabal b/haphviz.cabal
--- a/haphviz.cabal
+++ b/haphviz.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                haphviz
-version:             0.1.1.4
+version:             0.1.1.5
 synopsis:            Graphviz code generation with Haskell
 description:
   There are multiple ways to describe this package:
diff --git a/src/Text/Dot/Render.hs b/src/Text/Dot/Render.hs
--- a/src/Text/Dot/Render.hs
+++ b/src/Text/Dot/Render.hs
@@ -33,7 +33,9 @@
 -- | Render a graph to graphviz code
 renderGraph :: DotGraph -> Text
 renderGraph (Graph gtype name content) = mconcat
-    [ "digraph"
+    [ case gtype of
+        DirectedGraph -> "digraph"
+        UndirectedGraph -> "graph"
     , " "
     , name
     , " "
