Roasted grapes—especially black grapes—are super sweet and slightly tannic, with a concentrated fruit flavor. They help balance the tangy, astringent quality of the cranberries, allowing you to use less added sugar.
Preheat oven to 425°F. Lightly coat a rimmed baking sheet with cooking spray. Place grapes, apple, and shallot on prepared baking sheet, and lightly coat with cooking spray. Bake at 425°F until shallot begins to soften, about 5 minutes.
Add cranberries to baking sheet. Bake at 425°F until cranberries burst, apple is tender, and grape skins are beginning to burst, about 20 more minutes. Remove from oven, and transfer grape mixture to a medium bowl. Stir in butter, maple syrup, and salt. Cool completely, about 1 hour. Sprinkle with thyme, if desired.