-
Notifications
You must be signed in to change notification settings - Fork 109
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
Add partialRefetch as an option #159
Add partialRefetch as an option #159
Conversation
Thanks @estrada9166. Could you add a unit test for it? |
fetchPolicy !== 'cache-only' | ||
) { | ||
const partialRefetchResult = { | ||
...result.data, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are empty so maybe it would be better, to keep stale data from previous result using useRef
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or maybe handle this here in a similar way as error is https://github.com/trojanowski/react-apollo-hooks/pull/159/files#diff-9affe4a75e3f039c2a00e27c8bf815aeR148
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, sorry to invade this PR without introduction. I didn't catch it in time and coded basically the same thing yesterday evening. So now I'm just sharing my experience. Thanks for the PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comments! I'll update the PR with this! is much better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW Also this one is related to the need of showing stale data:
#134
@brabeji Any new for this? :) Thanks! |
@trufa I'm using a locally patched version of |
fix #128
Taken from here