Shred the carrots, cabbage and onions in a food processor fitted with a shredding blade. Place the vegetables in a large bowl and mix in the mayonnaise, sugar, vinegar, granulated garlic, granulated onion and a pinch each salt and pepper. Refrigerate for at least 1 hour or up to overnight.