You probably won't be able to board in GOT unless you have your passport; they'll check your documents for RUH at that point. Maybe you can talk them into checking you in for the GOT-IST leg without issuing a boarding pass for the IST-RUH leg, but I wouldn't count on it if I were you, especially not on the strength of advice from strangers on the internet.
In fact, since Swedish citizens are not among those who can enter Turkey with a national ID, you will almost certainly be unable to board the first leg of your flight without your passport.
I would advise you to call the airline and run this idea past them. They are the only ones who will be able to tell you whether they will allow you to board their airplanes.