Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import { CachedBookList, CachedTotal } from '../../../../typings/custom'

export const updateCache: MutationUpdaterFn = (
cache,
{ data: { newBook } }
{ data }
) => {
const { newBook } = data!
// If the data is not present in the cache, the readQuery method will throw.
// This happens when the user first visits this page and then go to the listing page
try {
Expand Down