Add generic graph.
Improved query graph representation.