How does Apollo Client know if all of the data exists in the cache?

For the cache-first fetch policy, if all requested data is present in the cache, that data is returned. However, how does Apollo Client know that all of the data is present in the cache? How does it know that the cache is missing some of the data you asked for?