my loading is forever "True"
See original GitHub issueam i the only one here facing this issue ? here my “dependencies”: { “@apollo/client”: “^3.6.2”, “graphql”: “^16.4.0”, “react”: “17.0.2”, “react-native”: “0.68.1” },
const client = new ApolloClient({ uri: ‘https://api.mocki.io/v2/c4d7a195/graphql’, cache: new InMemoryCache(), });
const GET_ME = gql query { users { id email name } }
;
const {data, loading, error} = useQuery(GET_ME);
console.log({error, loading, data});
if (loading) return <Text>Loading…</Text>;
if (error) return <Text>Error! ${error.message}
</Text>;
RESULT : {error: undefined, loading: true, data: undefined}
please advise. thanks
Issue Analytics
- State:
- Created a year ago
- Reactions:10
- Comments:37 (7 by maintainers)
Top Results From Across the Web
Top 10 Reasons for Slow Loading Websites (And How to Fix It)
Ever wonder why your website is slow? Here are 10 of the most common causes that slow down your site, and also tips...
Read more >10 Reasons for Slow Website Loading (With Solutions)
Understand these 10 core reasons for slow website loading and learn how to resolve these issues & your traffic, revenue, and credibility.
Read more >How to fix an app from "Loading" forever? - Google Support
When I open an app it shows it is "loading" sign wise (has loading symbol on it) but never actually loads. I have...
Read more >6 Ways to Fix a Slow Loading Website | HostGator
Learn 5 ways to fix your slow-loading website to ensure slow site speeds aren't impacting your user experience or SEO performance!
Read more >Weava is loading forever - Jira Service Management - Atlassian
Solution · Please open your Weava Chrome extension settings (insert this URL in your browser chrome://extensions/?id=cbnaodkpfinfiipjblikofhlhlcickei). · Enable “ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m seing this issue with 3.6.9 (react 17)
Hi, react-query maintainer here 👋
It seems that we have similar problems with the following setup:
useSyncExternalStore
shim via:import { useSyncExternalStore } from 'use-sync-external-store/shim/index.js'
which is also what apollo-client is doing: https://github.com/apollographql/apollo-client/blob/95c8a1a8211302b07dddd0a5e6e67119111009d7/src/react/hooks/useQuery.ts#L10and as far as I can see, the last “working version” was the one before you switched to uSES.
I can confirm that the shim works fine with react17 and react18 for the web. We’ve also narrowed down that in the above setup, the
subscribe
function from useSyncExternalStore is just never called, which is why no fetches are made (at least in react-query). Now the question is:useSyncExternalStore
(without apollo or react-query) that fails, which would point to an issue in the shim itself, so that we can reach out to the react team.