question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Loading prop in MockedProvider is always true

See original GitHub issue

Is 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:open
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Emiliano-Buccicommented, Jan 30, 2020

@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 the MockedProvider, though i don’t know if this lib is relevant or not. I will keep investigating, thanks for the support 😃

1reaction
Emiliano-Buccicommented, Jan 30, 2020

@lfades Ok thanks, i will take a look 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found