You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where baz is a list of objects without any ID.
Query A is executed and the cache is stored as:
foo:1 => {
baz => [{ qux => 42 }]
}
And now query B is executed, updating the cache to:
foo:1 => {
baz => [{ qan => 42 }]
}
So we go to update query A's response with the new data in the cache, but qux isn't present on baz!
This is called the missing data problem apparently, and there are problems with it in both apollo and relay:
Imagine 2 queries like:
where
baz
is a list of objects without any ID.Query A is executed and the cache is stored as:
And now query B is executed, updating the cache to:
So we go to update query A's response with the new data in the cache, but
qux
isn't present onbaz
!This is called the missing data problem apparently, and there are problems with it in both apollo and relay:
facebook/relay#2237 (comment)
apollographql/apollo-client#6375
https://github.com/apollographql/apollo-client/blob/4e147b579bff210dbbc884d918edb1e69c2cfa9f/src/cache/inmemory/readFromStore.ts#L261-L277
Consistency and refetching
In this specific example however, it looks like apollo refetches the query. Should investigate as to how/why it does that
The text was updated successfully, but these errors were encountered: