Preheat oven to 375°F. Grease a 9x9 inch (2 1/2 quarts) baking dish with olive oil or non-stick cooking spray.
To a small bowl, add salt, pepper and fresh chopped thyme. Whisk to combine.
Using a mandoline slicer or sharp knife, slice sweet potatoes and shallot 1/8th inch thin, then separate shallot rings. Set aside.
Arrange half of the sweet potatoes and shallot rings in the baking dish. Sprinkle one tablespoon of flour on top with half of the thyme mixture and half of the cheese. Repeat another layer with remaining potatoes and shallots in overlapping rows. Scatter with remaining thyme mixture.
In a small bowl whisk together 1/4 of heavy cream and remaining three tablespoons of flour until smooth. Whisk in remaining cream and chicken stock. Pour evenly over sweet potatoes and top with remaining cheese.
Bake for 45 minutes or until golden and bubbling. Let scalloped sweet potatoes rest for 10 minutes, then garnish with sprig of thyme and serve while warm.
2 cups shredded is about 6.5 ounces of cheese. I've used 12 slices of Gouda before and divided it to 6 on top of one layer and 6 slices on the other. Feel free to use sharp cheddar cheese or Gruyere if Gouda is not available. A sprinkle of Parmesan cheese on the top is fantastic too.
Recipe adapted from a Sunset magazine recipe by Elaine Johnson.