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
With apollo and cache persist typescript #29718
With apollo and cache persist typescript #29718
Conversation
…:adrianos10/next.js into with-apollo-and-cache-persist-typescript
There is an issue here with this setup, because when SSR pages are loading in the browser, we would first see "Initializing..." as there isn't any client (waiting for cache) I have resolved the issue by changing it to below useApollo: `export const useApollo = ( const getSessionStorageCache = async (cache: InMemoryCache) => { function initApolloClient() {
} const client = initApolloClient() would like to know if anyone have better idea |
df8579c
to
47e5ebe
Compare
Hi, given the age of this PR and the recent discussion in #42771 (review) to cut down the number of Apollo examples we currently have, I am going to close this PR, but thanks anyway! |
Hi, I couldn't find any example on how to integrate Apollo Client using TypeScript with Apollo cache persist (https://github.com/apollographql/apollo-cache-persist) so I've made one. Data that comes from SSR and data from runtime queries is persisted.