-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Data is undefined on cold cache start #5924
Comments
@dilame Just to be sure I'm understanding, are you calling |
I'm using client.watchQuery, because |
I'm sorry, i will use this issue for another one bug report because i have the same setup, dont want to duplicate it. I've found one more bug. Even if i subscribe to But actually there is NO REQUESTS. I can tell it because i look at |
|
My setup
Intended outcome:
I don't want to recieve undefined data. It breaks the whole application and violates your type definitions.
Your types declares that data will always be defined
https://github.com/apollographql/apollo-client/blob/master/src/core/types.ts#L23
so i cant even check the data without
@ts-ignore
.It's a pain to check it everywhere
Actual outcome:
I recieve undefined data and a lot of errors in console like
ERROR TypeError: Cannot read property 'account' of undefined
How to reproduce the issue:
Just set
fetchPolicy: 'cache-and-network'
and query smth.Versions
The text was updated successfully, but these errors were encountered: