Skip to content
Snippets Groups Projects
Commit 93e410e5 authored by Jure's avatar Jure
Browse files

fix: evict manuscript from cache after deletion

parent 44acae40
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,15 @@ const DELETE_MANUSCRIPT = gql`
`
const User = ({ manuscript }) => {
const [deleteManuscript] = useMutation(DELETE_MANUSCRIPT)
const [deleteManuscript] = useMutation(DELETE_MANUSCRIPT, {
update(cache, { data: { deleteManuscript } }) {
const id = cache.identify({
__typename: 'Manuscript',
id: deleteManuscript,
})
cache.evict({ id })
},
})
return (
<Row>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment