It's both for me. A great story isn't worth going through when bogged down by bad game mechanics.

Though if the game mechanics are good, I can always just play the game and ignore a bad story. Not really forced to subjagate myself to that, though it doesn't lend much replay value or enjoyment if I don't have a good story to play through.