If I change Apollo cache, Is this change reflected without refresh?

Viewed 81

I use apollo server and graphql.

I move from screen A to screen B. And in screen B, I change data of screen A.

So in order to reflect this change, I change cache of that data.

And I navigate.goBack() to screen A.

Then this modified cache will be applied in screen A?

For me, it doesn't.

So I wonder whether because I incorrectly modified my cache or just because it's regardless of cache modification, screen should be same since navigate.goBack doesn't refresh screen.

I can use refetch option of useQuery for this but in that case flatlist scroll goes on top, so I don't want.

0 Answers
Related