Advice on swing sleeping ?

Victoria

My little one is almost 3 months and he doesn’t wanna sleep in his bassinet he will only sleep in his swing or in my bed. I just wanna ask has anyone had problems with this ? Like is it okay for them to sleep long stretches in the swing? Cause this is the only way him and I get any sleep. Especially through the night!