Query graph tool