adamsoffer / next-apollo

React higher-order component for integrating Apollo Client with Next.js
MIT License
482 stars 64 forks source link

Data prefetch when changing pages #54

Closed fatlinesofcode closed 4 years ago

fatlinesofcode commented 5 years ago

Is it possible to pre-fetch the data from the queries before the page does a client side render? Prefetching seems to work fine for SSR but i if transition to another page the graphql queries run after the next page render.

I noticed this didnt happen with https://github.com/lfades/next-with-apollo The behaviour there is: click on link, query requested and completes, then the page transitions and the next page is rendered with the data.

adamsoffer commented 5 years ago

@fatlinesofcode I just published v3.1.4 so it's now more in line with what's in the official example. Can you confirm it behaves in the same way now?

fatlinesofcode commented 5 years ago

hi @adamsoffer thanks for the follow up, but we've decided to run apollo at the _app level now instead.