Graph-based Learning for Efficient Resource Allocation in Wireless Networks under Constraints