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
{{ message }}
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
Like many apps, I have a screen that fills its data from graphql. It has a pull to refresh list. When you pull to refresh, it does a graphql refetch() If:
User views a list with pull to refresh (which calls refetch())
User loses connectivity
User pulls to refresh
Error message is shown due to existence of graphql error
User regains connectivity
User pulls to refresh
Error message still shows. error is still there in props!
This is because react-apollo never gets notified of the query change (happens here and thus it never re-renders.
I dug into it and the problem is actually from apollo-client, not react-apollo. They optimized to prevent duplicate subscription notifications but didn't take into account my scenario: apollographql/apollo-client#1601
I'd be happy to make a test to prove the behavior. Or please reach out to me and I can provide a sample application. I love that you are testing your libraries, but I've had a very hard time building a good offline experience with Apollo and React Native. Thanks!
The text was updated successfully, but these errors were encountered:
Hi @StevePotter, thanks again for #1601! Can you install [email protected] and let me know if that fixes the issue for you (it's not yet tagged as latest).
@helfer I'm having the same issue using the following:
"apollo-cache-inmemory": "^1.1.4",
"apollo-client": "^2.0.4",
"apollo-client-preset": "^1.0.5",
"apollo-link-http": "^1.3.2",
"react-apollo": "^2.0.4",
When I call refetch, I noticed that it actually makes the call to the server and grabs the data, but never calls the render to update the data in the component.
Like many apps, I have a screen that fills its data from graphql. It has a pull to refresh list. When you pull to refresh, it does a graphql
refetch()
If:User views a list with pull to refresh (which calls
refetch()
)User loses connectivity
User pulls to refresh
Error message is shown due to existence of graphql error
User regains connectivity
User pulls to refresh
Error message still shows.
error
is still there in props!This is because react-apollo never gets notified of the query change (happens here and thus it never re-renders.
I dug into it and the problem is actually from apollo-client, not react-apollo. They optimized to prevent duplicate subscription notifications but didn't take into account my scenario: apollographql/apollo-client#1601
I'd be happy to make a test to prove the behavior. Or please reach out to me and I can provide a sample application. I love that you are testing your libraries, but I've had a very hard time building a good offline experience with Apollo and React Native. Thanks!
The text was updated successfully, but these errors were encountered: