Quantum phase transitions and quantum fidelity in free fermion graphs