hpi-swa-lab / BP2021RH1

Crowd-Sourced Picture Archive for Bad Harzburg / BP2021RH1
https://bilder.bad-harzburg-stiftung.de/
MIT License
4 stars 0 forks source link

Fix PictureSequenceInfoField sometimes showing no pictures #646

Closed MariusDoe closed 3 months ago

MariusDoe commented 1 year ago

Closes #625

Before, when switching between two pictures, where the first is part of a sequence, the the other pictures in the sequence are not shown when switching back to the first. The exact reason is unclear, however print debugging has shown that during switching, the correct array of pictures is displayed first, only to be replaced by an empty array shortly after. Since this commit fixes the issue by changing the fetchPolicy from 'cache-first' (default) to 'cache-and-network', the problem is likely related to Apollo's caching behavior.