Peel the potatoes and slice very thinly with a mandolin or sharp knife. Place them in a bowl and cover with cold water. Allow to stand for about 10 minutes. Drain on kitchen paper.
Peel and slice the onions. Heat the oil in a large frying pan over a medium heat. Add the onions and sauté for 2 minutes. Add the potatoes and cook for 15-20 minutes, turning frequently, until they are tender and golden.
Grate the Gruyère cheese. Add the basil to the pan and stir in. Sprinkle the cheese over the top and cook for 2 minutes, without stirring, until the cheese melts. Season and serve.