Heat the oil in a medium saucepan over medium heat. Add the ginger and onions and cook until soft, about 5 minutes. Add the grapefruit and orange juices and sugar and bring to a boil. Cook until the sugar has melted and the mixture reduces slightly.
Stir in half of the cranberries and cook, stirring occasionally, until the berries pop and break down and the mixture begins to thicken. Add the remaining cranberries and cook just until the berries pop, about 5 minutes more. Remove from the heat, stir in the orange zest and grapefruit segments and season lightly with salt and pepper. Transfer to a bowl, stir in the parsley and serve at room temperature.