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

Add partialRefetch as an option #159

Closed
wants to merge 4 commits into from
Closed

Add partialRefetch as an option #159

wants to merge 4 commits into from

Conversation

estrada9166
Copy link

fix #128

Taken from here

@trojanowski
Copy link
Owner

Thanks @estrada9166. Could you add a unit test for it?

fetchPolicy !== 'cache-only'
) {
const partialRefetchResult = {
...result.data,
Copy link

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.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

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!

Copy link
Author

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.

Copy link

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

@trufa
Copy link

trufa commented Jul 2, 2019

@brabeji Any new for this? :) Thanks!

@brabeji
Copy link

brabeji commented Jul 2, 2019

@trufa I'm using a locally patched version of react-apollo-hooks (via patch-package) and waiting for official support from react-apollo: apollographql/react-apollo#2892 (comment)

@estrada9166 estrada9166 closed this Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

partialRefetch as an option
4 participants