add instance Eq for all graph types and nub generated topologies by it