They've been going off the books for a while now. If I recall correctly, the last book published so far ends with Daenarys being dropped in a grass field by Drogon after he rescues her from the fighting pits, only to be surrounded by Dothraki. That was at least 2 seasons ago I think. Of course GRRM had some chapters of the next book that he publicly read here and there but as far as I know they did not contain major plot points for the main characters.
Actually I think they did a really good job when they went past the books, would have expected much worse. I can understand the complaints about the season feeling rushed, but Dany going bat-sh*t crazy was not really a surprise. They could have used some time in the first two episodes to build that up a bit more. That way, Jon's realisation and action would have had more weight to it.
But that's the problem with such shows: everybody has a different ending in mind and you can only pick one, so lots of people will be disappointed. But hey, they gave us 8 years of what is - all in all - one of the greatest shows we ever got. So I am not upset