The movie of the Neverending Story has the exact opposite message of the book.
The book of the Neverending Story is actually about how imagination and losing yourself in fantasy worlds are actually really terrible because they make you forget the real world and what’s important. The movie ends at the halfway point of the book, but I suppose getting a happy ending is only a question of where you choose to stop telling the story.
In the book, our young hero discovers that his wishes and daydreams extract a horrible price: each wish causes him to lose memories of the real world and his real life. At one point, he discovers an island full of demented, lunatic wretches who don’t remember anything about their lives, and he is horrified to discover they were all former “Chosen Ones,” from the real world, just like him.