Why do we need GraphQL when we have REST APIs?

Both serve a different purpose, but both can achieve the exact same thing.