How to optimally use cached item from a list query

I have a query as:

  posts(author_id: '1') {
    id
    content
  }

And another query later as

post(id: '1') {
  id
  content
}

I would like the second query to just return the item in the cache with id '1' if it exists otherwise contact the server.

How do I configure the client to do this - Somehow, I need to state that post(id) query can just point to the item with same id in the cache. If new fields are queried, then query must be directed to the server.

This is called cache redirects and is documented here:

1 Like