On the intersection ring of graph manifolds