Handle cache update when creating new metadata

In case the metadata didn't exist yet, it was never added to the meta array because the objects meta field was never updated
This commit is contained in:
schroda
2024-09-22 02:46:01 +02:00
parent 7abfbd09ef
commit a06e170d78
10 changed files with 174 additions and 45 deletions

View File

@@ -8,6 +8,14 @@
import gql from 'graphql-tag';
export const MANGA_META_FIELDS = gql`
fragment MANGA_META_FIELDS on MangaMetaType {
mangaId
key
value
}
`;
export const MANGA_BASE_FIELDS = gql`
fragment MANGA_BASE_FIELDS on MangaType {
id
@@ -64,14 +72,13 @@ export const MANGA_CHAPTER_NODE_FIELDS = gql`
export const MANGA_READER_FIELDS = gql`
${MANGA_BASE_FIELDS}
${MANGA_META_FIELDS}
fragment MANGA_READER_FIELDS on MangaType {
...MANGA_BASE_FIELDS
meta {
mangaId
key
value
...MANGA_META_FIELDS
}
chapters {