Skip to content
Snippets Groups Projects

Persist submission form values with apollo-link-state

Merged Aanand Prasad requested to merge persist-submission-state into master
1 file
+ 4
4
Compare changes
  • Side-by-side
  • Inline
+ 4
4
@@ -3,7 +3,6 @@ import ReactDOM from 'react-dom'
import { AppContainer } from 'react-hot-loader'
import createHistory from 'history/createBrowserHistory'
import { withClientState } from 'apollo-link-state'
import { defaultsDeep } from 'lodash'
import { configureStore, Root } from 'pubsweet-client'
@@ -16,9 +15,10 @@ const history = createHistory()
const store = configureStore(history, {})
const makeApolloConfig = ({ cache, link, ...config }) => {
const clientStateLink = withClientState(
defaultsDeep({ cache }, AuthorDetailsSchema.clientStateConfig),
)
const clientStateLink = withClientState({
cache,
...AuthorDetailsSchema.clientStateConfig,
})
return {
cache,