Apollo Cache: Querying by id

In the cache documentation [1], the docs describe a scenario where "the first time your app queries for a Book object with id 5".

What does it mean to query a Book with object id 5? Does it mean a query that uses id as a variable like the following:

Query {
  book(id: 5)
}

GraphQL variables don’t necessarily correspond to object fields, so there’s no way in general to know that this is a query for Book:5. Does Apollo assume the id variable is a request for an object with that id?

The docs then say “And each later time your app queries for that same object”. What does it mean to query for the same object? As I understand, Apollo does not know about my GraphQL schema, so it doesn’t know which fields correspond to which objects. So it couldn’t, for instance, return a cached result for a separate query:

Query {
   getBook(id: 5)
}

Does the subsequent query have to be for the same field, i.e. book(id: 5)?

[1] Caching in Apollo Client - Client (React) - Apollo GraphQL Docs