Restrict types for Graph and Edge
Add method for Graph