Persist submission form values with apollo-link-state
2 unresolved threads
2 unresolved threads
To try it out:
- On the dashboard, click "Submit a manuscript"
- Fill out the form
- Click "Next"
- On the file upload dummy page, click "Author details" to return to the form
- The values you entered should still be there
Edited by Aanand Prasad
Merge request reports
Activity
Filter activity
added 1 commit
- 53c6da24 - feat: persist author details in Apollo cache
added 5 commits
-
53c6da24...5dc6143a - 2 commits from branch
master
- 15e0efcc - feat(submission): integrate yup for validation
- 67423b6e - refactor: define empty values in schema file
- cd27131e - feat: persist author details in Apollo cache
Toggle commit list-
53c6da24...5dc6143a - 2 commits from branch
27 27 }) 28 28 29 29 const empty = { 30 __typename: 'Submission', 13 15 const store = configureStore(history, {}) 14 16 17 const makeApolloConfig = ({ cache, link, ...config }) => { 18 const clientStateLink = withClientState({ 19 cache, 20 resolvers: { 21 Mutation: { 22 updateCurrentSubmission: (_, { input }, { cache }) => { 23 cache.writeData({ data: { currentSubmission: JSON.parse(input) } }) 24 return null 25 }, 26 }, 27 }, 28 defaults: { 29 currentSubmission: empty, 30 }, changed this line in version 6 of the diff
it's what this was for n'est ce pas?
added 6 commits
-
cd27131e...25abc506 - 5 commits from branch
master
- ef576a18 - feat: persist author details in Apollo cache
-
cd27131e...25abc506 - 5 commits from branch
added 1 commit
- 44bb22c3 - refactor: put apollo-link-state config in the schema file
added 9 commits
-
b62c9738...ff1ee3bd - 4 commits from branch
master
- c76670ff - feat: persist author details in Apollo cache
- 578a4b72 - refactor: put apollo-link-state config in the schema file
- 6b46b670 - refactor: remove JSON parsing/serialization
- 1f166e87 - refactor: remove premature cleverness
- 262f9b80 - fix: ensure state is saved before redirecting
Toggle commit list-
b62c9738...ff1ee3bd - 4 commits from branch
mentioned in commit 145c5d3b