Loading prop in MockedProvider is always true
See original GitHub issueIs it possible that with the new version of the withApollo
the loading
prop is always true? It seems that jest don’t await anymore to the promise to be resolved.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:9 (3 by maintainers)
Top Results From Across the Web
React Apollo MockProvider always loading, never giving data
I'm trying to test a component that uses graphql, but when using Apollo's MockProvider I never get the data, it just says loading...
Read more >MockedProvider causes useQuery to always return "undefined ...
This is to allow the component to render while the data is being fetched behind the scenes. You can verify this by checking...
Read more >Gotchas using React Apollo MockProvider | by Tomoaki Imai
If you are using Fragment, you should always add __typename to the ... let's add InMemoryCache as props of MockProvider. <MockedProvider
Read more >Apollo MockedProvider always returns undefined for data field ...
Coding example for the question Apollo MockedProvider always returns ... should load the data then render the page (58 ms) console.log {"loading":true} at ......
Read more >next-with-apollo - Bountysource
This means that if you need to query based on props.query , it will only run the ... with the new version of...
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
@lfades I’ve tried to downgrade to the same versions that you have but still no luck; the only thing i’ve noticed is that you don’t have installed
@apollo/react-testing
form where i take theMockedProvider
, though i don’t know if this lib is relevant or not. I will keep investigating, thanks for the support 😃@lfades Ok thanks, i will take a look 😃