Two graph-based tests for high-dimensional inference