The General Assembly has agreed to ask the International Court of Justice to say what Israel needs to provide in Gaza and the West Bank.