Add write support for mixed undirected/directed graphs