Apollo client: Optimistic update for adding a list item where item detail query is separate causes cache miss

Intended outcome:
We have a list of items whose ids are queried initially and then each renders to its own component instance that does another query for the details. When you add an item, the mutation response and optimistic update store that item in your cache but of course it is not added to the list. So we write to the cache for the list query to add the item id to the list of ids. Then a new instance of the item component is rendered for that id and the query for the details should find the item in the cache, and render the item with our optimistic details.

Actual outcome:
When a new instance of the item component is rendered for our optimistic id and the query for the details should find the item in the cache, it doesn’t even though it is there. This means our optimistic updating isn’t really working. What you see is a blank item added to the list before the mutation succeeds. When it succeeds, then the item is rendered with its details.

How to reproduce the issue:

bump ping bump ping ping.