-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useQuery/useLazyQuery stuck on "loading" state in expo/react-native devices #9689
Comments
I'm having a similar problem. My app is currently on Apollo Client 3.5.9 and working great. I originally upgraded to 3.6.2 and suddenly all my queries stopped working. I backtracked versions and discovered that the problem started with 3.5.10. If I run on 3.5.9, everything is great. If I upgrade to 3.5.10, all my useQuery calls effectively stop working. The loading in the response is always true and no data is ever returned. I have no idea why the changes in 3.5.10 make a difference but I can reliably reproduce the issue simply by upgrading my app from 3.5.9 to 3.5.10. If I go back to 3.5.9, all is good. |
Same issue here, I had to downgrade the version for solve it |
+1 |
1 similar comment
+1 |
Hope this helps: |
It also works for me if I downgrade to version |
Looks like a common and definite bug. For me it is still working on following versions setting:
|
+1 |
1 similar comment
+1 |
This is a duplicate of #9668 |
Looks like new alhpa version solves the case. (3.7.0-beta.3)
|
I'm still seeing this problem with apollo/client 3.7.5 and react version 18, expo version 47. The "loading" var is forever in true state and both data and error are undefined. I used fetch with same url and headers and was able to fetch the data, so do think this is apollo client related. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
In latest versions of Expo React Native (also newest versions of Apollo Client for React) useQuery no longer works. Any query executed with Apollo client works well in the web, but on mobile devices (both real device and emulator) is stuck on "loading" state. No error is returned.
Intended outcome:
Execute a query with apollo client on new expo application. Receive data.
Actual outcome:
Query is executed but stuck on "loading". Both useQuery and useLazyQuery. The properties of object returned by useQuery are as follows: data - undefined, error, undefined, loading - true.
How to reproduce the issue:
The example project recommended on Apollo website, after upgrading the libs to newest versions, is not working to (no data is shown after application start - always loading). https://github.com/GraphQLGuide/guide-react-native
Versions
System:
OS: Windows 10 10.0.19044
Binaries:
Node: 16.14.2 - E:\Tools\Node\node.EXE
npm: 8.5.3 - E:\Tools\Node\npm.CMD
Browsers:
Chrome: 100.0.4896.127
Edge: Spartan (44.19041.1266.0), Chromium (101.0.1210.32)
npmPackages:
@apollo/client: ^3.2.1 => 3.6.2
The text was updated successfully, but these errors were encountered: