Fix/adding manga to library not updating category (#559)
* Refetch categories after updating a manga After adding/removing a manga to/from the library, the categories did not update. * Include manga categories int the manga update mutation response
This commit is contained in:
@@ -75,6 +75,15 @@ export const UPDATE_MANGA = gql`
|
|||||||
id
|
id
|
||||||
inLibrary
|
inLibrary
|
||||||
inLibraryAt
|
inLibraryAt
|
||||||
|
categories {
|
||||||
|
nodes {
|
||||||
|
id
|
||||||
|
mangas {
|
||||||
|
totalCount
|
||||||
|
}
|
||||||
|
}
|
||||||
|
totalCount
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -88,6 +97,15 @@ export const UPDATE_MANGAS = gql`
|
|||||||
id
|
id
|
||||||
inLibrary
|
inLibrary
|
||||||
inLibraryAt
|
inLibraryAt
|
||||||
|
categories {
|
||||||
|
nodes {
|
||||||
|
id
|
||||||
|
mangas {
|
||||||
|
totalCount
|
||||||
|
}
|
||||||
|
}
|
||||||
|
totalCount
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1414,7 +1414,8 @@ export class RequestManager {
|
|||||||
);
|
);
|
||||||
|
|
||||||
result.response.then(() => {
|
result.response.then(() => {
|
||||||
this.graphQLClient.client.cache.evict({ fieldName: 'mangas' });
|
this.graphQLClient.client.cache.evict({ broadcast: true, fieldName: 'categories' });
|
||||||
|
this.graphQLClient.client.cache.evict({ broadcast: true, fieldName: 'mangas' });
|
||||||
});
|
});
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Reference in New Issue
Block a user