You must meet the Study in the UK requirement before applying for the Graduate visa route. This specifies the minimum period you must hold a Student visa, during which all study must have taken place in the UK.
The Study in the UK rules differs depending on the course length. The course must be 12 months or more, but for courses longer than 12 months, you should have held Student permission (a Student visa) for at least 12 months, during which time all study must have taken place in the UK.
If you have previously held permission under a different immigration category, and this led to your course being completed using a combination of immigration routes, then your recent visa must be a Student Visa, and you must have spent at least 12 months in the UK studying that course.
For courses that are 12 months or less, you must hold a Student visa for the duration of the course.
Please note: UKVI Guidance states that if you applied for a Student visa before you started the course but it was not granted until after you started the course, you will be treated as having permission from the start date of the course.
The Study in the UK rules are very complex, and institutions always seek clarity from UKVI (United Kingdom Visas and Immigration). If you need clarification on any part of the visa process, please feel free to contact the Visa Compliance team at firstname.lastname@example.org.
Please ensure that you try to only travel for short periods outside the UK when considering applying for the Graduate visa. If you decide to travel, make sure that you first discuss this with the Visa Compliance team, who can make the assessment as to whether you have met the requirements of this visa route first. Lengthy travel may jeopardise your student visa.