can some one point me in the direction to implement Graph UI questions. a simple example will do.
There's a demo quiz of the GraphUI here: https://coderunner.org.nz/mod/quiz/view.php?id=466. It consists of a description of how the GraphUI works followed by a single demo question. Check it out and see if it's sufficient to get you going. The description preceding the question now includes a link to allow you to download a Moodle XML export of the question. If you import the question, you can study the template to see how it works. I've added lots of comments to help explain it.
You can also inspect the DirectedGraph and UndirectedGraph question types (e.g. by creating a question of such a type and checking Customise to allow you to see the template). The only difference between directed and undirected graphs is in the setting of a template parameter isdirected. If you want a Finite State Machine graph, which allows incoming edges from empty space and marking of accept nodes by double clicking, set a template parameter isfsm to true. Other template parameters allow setting of font size and node radius, and provide a rather clumsy way of locking edges or nodes, useful if you wish to provide a sample answer to students and you don't want them to change some aspects of it. These are documented here.
Post back here if you need more info.
I went through the XML and figured few things. I'm trying to create a "Networking Routing : Dijkstra's Algo " type question with GraphUI and wanted to get some insight on how to set up test cases.