It's what you'll put in to it. Follow all your doc orders and you should be fine. Although I didn't have wls before my 2nd pregnancy, i did have gestational diabetes and was obese, but i followed everything i had to. I gained 15lbs with medical supervision during my whole pregnancy and my baby girl was just fine and I didn't gain more than I had too. Be encouraged, you can do this and do it well and right. Remember that EVERYTHING is about the baby when you're pregnant. My doc reminded me of that several times during mine to make sure I stay on target.
To compare, my first pregnancy is when I started my obesity. From a healthy weight I gained 65lbs and never took it off. My mind wasn't focused on the baby but what I wanted (and it was junk-fast food-etc). Thank God my daughter is well and healthy, BUT I wish I had better intentions and was mature enough to make everything about her when I was pregnant. So, there's a huge difference when we change our mindset from ourselves to the little precious baby growing inside.
Hope this encourages you to be mindful of doing what's healthy for you and ultimately the baby. With that, you should gain a healthy pregnancy weight.