A move to build a huge £45m warehouse on green space next to a school in Wolverhampton has been given the seal of approval.