Skip to content
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

Apollo Client 3.6.+ running exceptions on Expo #9649

Closed
Brucia323 opened this issue May 1, 2022 · 5 comments
Closed

Apollo Client 3.6.+ running exceptions on Expo #9649

Brucia323 opened this issue May 1, 2022 · 5 comments
Assignees
Labels

Comments

@Brucia323
Copy link

useQueryuseMutation 都无法正确执行。

Both useQuery and useMutation do not execute correctly.

在 Expo 上运行 Apollo Client 3.6.1 时,Android 模拟器无法正常运行,而 Web 可以,当我切换到 3.5.10 后,才能正常运行。

When I running Apollo Client 3.6.1 on Expo, It will not running properly in Android emulator but it can running in web, then I use 3.5.10, It works properly.

Intended outcome:

loading 总是 true,networkStatus 总是1,当我不停的将 fetchPolicy 注释和解开注释,它有可能正常运行,但似乎都是缓存的数据。对于 fetchPolicy,我尝试过 no-cachenetwork-onlycache-and-network,都不能正常运行。

Loading always true and networkStatus always 1, but when I keep note code and unlock the note with fetchPolicy, it Probability of normal loading, but that seems to be the cached data. I try to set fetchPolicy to no-cache, network-only or cache-and-network, it always not working properly

Actual outcome:

useQuery 正常运行时,loading 应该是 false,networkStatus 应该是 7.

How to reproduce the issue:

我是在学习 这个 时遇到的问题,或许你们可以尝试一下会不会遇到问题,我的代码在 https://github.com/ZZZCNY/Android-Application-Development-Fundamentals.git 可以看到。

I was learning this when I encountered the problem, maybe you can try to see if you will encounter the problem, my code is at https://github.com/ZZZCNY/ Android-Application-Development-Fundamentals.git can be seen.

Versions

@chenkaiC4
Copy link

i got the same issue, more info: loading keep with status true even if called is true, and the data is undefined

@martsaarmets
Copy link

Same here, the real network requests never get executed with useQuery or HOC/Components. 3.5.10 works correctly.
Although, if I call client.query() directly then the network request gets executed correctly.

@VictorPulzz
Copy link

Same error!

@jpvajda
Copy link
Contributor

jpvajda commented Jun 3, 2022

Hello everyone! We've been doing some bug fixing in several patch releases of 3.6, I'm curious if you try updating to our latest 3.6.6 release if it resolves your problems. You can review our changelog for details on what was resolved recently.

@jpvajda jpvajda added 🏓 awaiting-contributor-response requires input from a contributor 🐞 bug labels Jun 3, 2022
@jpvajda jpvajda self-assigned this Jun 3, 2022
@nickmacavoy
Copy link

I was caught out by this originally – Expo running an apollo-client 3.6.x version. The web view of my Expo project was working fine, but my iOS was never loading any data and stuck on a loading state.

I've just run through all the versions since to give a breakdown. Pleased to say this issue for me has been resolved – thanks for your work on this.

✓ 3.5.10 (version I had to revert to)
⨯ 3.6.0 - web working, iOS not working
⨯ 3.6.1 - web working, iOS not working
⨯ 3.6.2 - web working, iOS not working
⨯ 3.6.3 - web working, iOS not working
✓ 3.6.4
✓ 3.6.5
✓ 3.6.6
✓ 3.6.7
✓ 3.6.8 (current)

@jpvajda jpvajda closed this as completed Jun 21, 2022
@jpvajda jpvajda removed the 🏓 awaiting-contributor-response requires input from a contributor label Jun 21, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants