Preheat the oven to 450F.
Season the pork loin generously with salt and pepper. Heat a cast iron pan over high heat. Once hot, add 1 tbsp of oil and sear the the loin on all sides until golden brown. Transfer to a roasting pan and roast for 10 minutes
In a bowl, combine the olive oil, onions, apples, mushrooms, and thyme. Toss it together and season with salt and pepper.
Lay the apples and vegetables in the roasting pan with the pork after the 10 minutes. Roast for another 15 - 20 minutes or until the vegetables are lightly golden brown and the internal temperature of the pork reaches 140F.
Transfer the pork and vegetables to a serving plate to rest for 10 minutes before slicing. Place the roasting rack onto your stove top over medium heat. Add the flour and stir to combine. Slowly stream in the chicken stock while stirring. Let it cook for 3-4 minutes until it thickens. Serve the gravy with the pork.