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

Expected behavior for data while loading is true with query or useQuery #7755

Closed
skolerst opened this issue Feb 25, 2021 · 1 comment
Closed

Comments

@skolerst
Copy link

Hello!

I am working with @apollo/client v3.3.6

I forked and made some updates to a sandbox here: https://codesandbox.io/s/apollo-fetchmore-issue-forked-0o7dq?file=/src/index.js

I was under the impression that if loading === true, then data should be undefined. As you can see in this example, calling fetchMore doesn't revert data to undefined.

What are the circumstances that would cause data to become undefined? Different query variables/calling refetch perhaps? Is there a scenario where calling fetchMore should cause data to become undefined?

Thanks!

@jcreighton
Copy link
Contributor

@skolerst Might be helpful to check out this previous issue related to data being undefined in 3.0. That issue should also help answer your question here re: different query variables.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants