Fix library gql query caching issue
With 8b8da30335 the library now calls `useGetMigratableSources` which uses the same `mangas` query as `GET_LIBRARY_MANGA_COUNT`.
However, they select different fields, which causes the cache to get overwritte, because it apollo-client wasn't merging the results.
This commit is contained in:
@@ -136,6 +136,12 @@ const typePolicies: TypedTypePolicies = {
|
||||
lastSyncStatus(_, { toReference }) {
|
||||
return toReference({ __typename: 'SyncStatus', key: {} });
|
||||
},
|
||||
mangas: {
|
||||
keyArgs: ['condition', 'filter', 'orderBy', 'orderByType', 'order'],
|
||||
merge(existing, incoming, { mergeObjects }) {
|
||||
return mergeObjects(existing, incoming);
|
||||
},
|
||||
},
|
||||
chapters: {
|
||||
keyArgs: ['condition', 'filter', 'orderBy', 'orderByType', 'order'],
|
||||
merge(existing, incoming) {
|
||||
|
||||
Reference in New Issue
Block a user