I use SSR to rehydrate the cache with initial state from the server

```
const cache = new InMemoryCache().restore(window.__APOLLO_STATE__)

```

Few mutations later, I need to **hard reset the cache to its initial state**. I naively tried to keep the initial store in component state and pass it to `client.restore`

```
componentDidMount () {
  this.setState({
    initState: this.props.client.extract()
  })
}

// When I need to reset, I'd call this method...
handleCacheReset () {
  this.props.client.restore( this.state.initState )
}

```

but it didn't work. Since I'm also using using `apollo-link-state`, I thought if I keep the cache data as defaults, maybe then I can write them when `client.resetStore` is called

```
const cache = new InMemoryCache().restore(window.__APOLLO_STATE__)
const link = withClientState({ cache })
const client = new ApolloClient({
  link, cache,
  defaults: cache.data.data
})
client.onResetStore(link.writeDefaults)

// ...when it's time to reset the store
client.resetStore()

```

But I only get `Missing field ... in {}` errors and no data gets written to the store. Worse, I can't use `client.writeData` since I only have the initial `window.__APOLLO_STATE__`. If only I could read the entire cache data, then it might be plausible, but there doesn't seem to be a `readData` method.

### Is there a way to programmatically restore the cache to its original state?

So far the only workaround I see is re-creating the entire `ApolloClient` and forcefully re-rendering the tree, which is expensive and inefficient. Thoughts?

P.S. Asked this on [GitHub](https://github.com/apollographql/apollo-client/issues/3670), but they closed it with no answer.