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

Extend with-data-prefetch to handle advanced use cases #3525

Merged
merged 1 commit into from
Jan 26, 2018
Merged

Extend with-data-prefetch to handle advanced use cases #3525

merged 1 commit into from
Jan 26, 2018

Conversation

shalzz
Copy link
Contributor

@shalzz shalzz commented Jan 2, 2018

Adds a prefetch function inspired by https://github.com/zeit/next.js/tree/canary/examples/with-data-prefetch to allow prefetch on mouse hover and other advanced use cases (maybe include in that example itself?).

Based off of work done at #3457 for using getDataFromTree on the client which enables this by leveraging the getInitialProps functionality.

@sergiodxa
Copy link
Contributor

@shalzz awesome idea but I don't think this should be tied to Apollo, instead improve the prefetch example to add this use case for onMouseOver, the examples are easily combinable if you read them.

@shalzz shalzz changed the title Add prefetching with data in with-apollo example Extend with-data-prefetch to handle advanced use cases Jan 18, 2018
@shalzz
Copy link
Contributor Author

shalzz commented Jan 18, 2018

@sergiodxa adapted the PR to be specific to the with-data-prefetch example and be agnostic of other examples.

Copy link
Contributor

@sergiodxa sergiodxa left a comment

Choose a reason for hiding this comment

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

Amazing!

@shalzz
Copy link
Contributor Author

shalzz commented Jan 26, 2018

Merge this?

@timneutkens timneutkens merged commit c40f184 into vercel:canary Jan 26, 2018
@shalzz shalzz deleted the with-apollo-data-prefetch branch January 28, 2018 03:26
@lock lock bot locked as resolved and limited conversation to collaborators Jan 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants