Get Graph from relation implementation

Not tested at all