Generally, to be eligible for the Graduate Route visa, you must have successfully completed a qualifying course for which your CAS (for your current visa) was assigned, and you must hold a valid Student visa, and you must make your Graduate Route visa application from inside the UK, as well as meeting other criteria.
If your Student visa has expired and you have returned to the UK to resit exams on a Standard Visitor visa as an external student, you will not hold the correct visa permissions to make a Graduate Route visa application, even if you have successfully completed your programme as an external student.