add clientside fetch delay
This commit is contained in:
parent
9b98843541
commit
3472670df5
|
@ -29,6 +29,10 @@ function getClient (uri) {
|
||||||
return new ApolloClient({
|
return new ApolloClient({
|
||||||
link: new HttpLink({ uri }),
|
link: new HttpLink({ uri }),
|
||||||
ssrMode: SSR,
|
ssrMode: SSR,
|
||||||
|
// we need to delay the cache-first check to wait for the cache to rehydrate from ssr
|
||||||
|
// occasionally, for queries like notifications, the cache is not populated when useQuery
|
||||||
|
// is called causing an additional network request
|
||||||
|
ssrForceFetchDelay: 250,
|
||||||
connectToDevTools: process.env.NODE_ENV !== 'production',
|
connectToDevTools: process.env.NODE_ENV !== 'production',
|
||||||
cache: new InMemoryCache({
|
cache: new InMemoryCache({
|
||||||
freezeResults: true,
|
freezeResults: true,
|
||||||
|
|
Loading…
Reference in New Issue