On Linux at least, hard links can't be made to directories, except for the magic . and .. links. So this only allows for a DAG.
Symbolic links can form a graph, and you can process them as needed using readlink etc. to traverse the graph, but they'll still be considered broken if they form a cycle.
I guess technically you could do bind mounts but that's messy