When would you choose GraphQL over REST, and what are the trade-offs?

While REST is standard, I’ve heard that GraphQL offers more flexibility, especially when dealing with complex data queries. But are there cases where GraphQL isn’t the best fit? How do you weigh the pros and cons of using GraphQL vs. REST, especially in terms of performance, learning curve, and maintainability? I’d love to hear real-world examples of when you chose one over the other.