For me the answer would be both...
For example I still love the original Elite, which in its day was both ground breaking graphics and gameplay.
I played other games just because they were fun, before we really started judging games by their graphics quality at all
On a gameplay example, I eventually bought Knights of the old republic years after its release purely for the rumoured storyline and gameplay. The graphics were outdated by then but gameplay alone was enough for me to give it a go.
On the graphics side I bought Oblivion and Crysis as soon as they came out - sold by the graphics, seeing the cutting edge of what PC's could do. As luck would have it Oblivion has kept me coming back due to gameplay. Crysis as well but to a lesser degree, people slate crysis but I didnt find the game play of puttingly bad at all.
There are a very few games that stand out in my mind as being graphically innovative and having detrimentally bad game play. Rise of the Robots was a game with huge graphical hype that might have sold better had they never released a playable demo. If there hadnt been a Demo I would have certainly bought it based on the graphics and expected at least passable playability (and been bitterly dissapointed)
I will buy a game either for special technical merit on the graphics side or for exceptional gameplay, but if it has both its likelly to be a long term game for me (like Elite, star wars galaxies and oblivion at release)