-
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 loading state always true #11608
Comments
That is indeed weird. Can you reproduce that behaviour with https://github.com/apollographql/rn-apollo-client-testbed, too? Ideally, I'd need to see this actually happening, so I really need a reproduction that I can execute on my machine. |
I didn't attempt within There is a bit too much boilerplate with the testbed and quirks to get it running in development. If it was as simple as cloning installing and running I am attempting to hit a public facing endpoint which has no problem retrieving data via iQL and other methods. I am curious if this is metro getting in my way or if it is apollo/client. Oddly enough, I attempted this with Tanstack react-query and produced the same results (always pending). So maybe it has something to do with react-native 0.73.4? I appreciate the rapid response on this though! |
https://github.com/Johnsgaard/fogtown-rn here is a public repo with the most basic setup you can have.
assuming you have the expo cli |
Also, as a side note. I have gotten a graphql api to work with a previous project but I used Here was the previous dependencies for that project:
|
iOS is hanging, though. The thing is: Apollo Client doesn't contain any code that would execute differently between iOS or Android. Since there is nothing we can do about it, I'm closing this issue here. I hope you find a fix soon! |
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better. |
Thank you for taking a look! I hope so too! |
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. |
Issue Description
I am having issues grabbing data from my endpoint when I use
apollo/client
inside anexpo
application.I have configured a brand new app with the following dependencies:
metro.config.json
:Network request is always
(pending)
and never resolves.I can grab data from my endpoint via
curl
,fetch
, and oddly enough I can get the apollo/client to work if I switch myreact-native
imports toreact-native-web
and run it in the web browser.I am not sure if this is a
React 18
issue, anapollo/client
issue but I cannot seem to use apollo/client with a vanilla configuration of expo even when I follow the documentation on installation.Link to Reproduction
https://docs.expo.dev/get-started/installation/
Reproduction Steps
console.log(data, loading, error);
// output
undefined true undefined
@apollo/client
version3.9.5
The text was updated successfully, but these errors were encountered: