Open qroac opened 1 year ago
Hi @qroac ππ» thanks for opening this issue! Given the nature of this issue we may take a while to investigate and prioritize it but we are definitely interested in finding out what might be going on here. Thanks in advance for your patience ππ»
Hi @bignimbus Thanks for picking up my issue. I'm aware that this might go way deeper than OSI layer 7 and could be hard to find. I really appreciate the work of the apollo team and wait for news on this issue. If I can provide any more info that might be helpful or test a potential bugfix, let me know.
In the meantime I'll urge my users to regularly open the app to get the data synced ;)
@qroac have you revisited this issue lately in a later version of Expo at all?
Issue Description
expo-background-fetch executes periodic tasks when the react-native app is in background. Using apollo client to query a graphql api, the query stays in state
loading
as long as the app is in background. After bringing the app back to foreground, all queries from background jobs get executed and resolved. For periodic syncing of data in background, this is quite unfortunate.PS: My demo app can be executed with expo Go on an android smartphone I checked that expo Go had permission to use background data and had android energy optimization disabled.
Link to Reproduction
https://github.com/qroac/apollo-expo-background-demo
Reproduction Steps
Example app provided in link to reproduction
expo-background-fetch
to register a background job that executes every 60 seconds