Skip to content

Conversation

@vladar
Copy link
Contributor

@vladar vladar commented May 30, 2025

Currently cache.modify issued within optimistic transaction doesn't work properly if modified node does not exist in the optimistic layer of the current optimistic transaction.

Apollo InMemoryCache doesn't have this problem because it can store individual fields in the layers. So cache.modify reads from layers below, but stores modified fields (only) in the same layer.

TODO: ForestRun doesn't store individual fields, so in order to properly mimic Apollo behavior we need to either copy chunks from lower layers, or create "fake" chunk in the optimistic layer with only modified fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants