Add optimistic response to metadata mutations

This commit is contained in:
schroda
2024-09-21 20:01:06 +02:00
parent fab5f0b860
commit 20eaa90c10
10 changed files with 101 additions and 89 deletions

View File

@@ -34,11 +34,14 @@ export const DELETE_CATEGORY_METADATA = gql`
mutation DELETE_CATEGORY_METADATA($input: DeleteCategoryMetaInput!) {
deleteCategoryMeta(input: $input) {
meta {
categoryId
key
value
}
category {
id
meta {
categoryId
key
value
}
@@ -51,15 +54,9 @@ export const SET_CATEGORY_METADATA = gql`
mutation SET_CATEGORY_METADATA($input: SetCategoryMetaInput!) {
setCategoryMeta(input: $input) {
meta {
categoryId
key
value
category {
id
meta {
key
value
}
}
}
}
}

View File

@@ -15,19 +15,14 @@ export const DELETE_CHAPTER_METADATA = gql`
mutation DELETE_CHAPTER_METADATA($input: DeleteChapterMetaInput!) {
deleteChapterMeta(input: $input) {
meta {
chapterId
key
value
chapter {
id
meta {
key
value
}
}
}
chapter {
id
meta {
chapterId
key
value
}
@@ -73,15 +68,9 @@ export const SET_CHAPTER_METADATA = gql`
mutation SET_CHAPTER_METADATA($input: SetChapterMetaInput!) {
setChapterMeta(input: $input) {
meta {
chapterId
key
value
chapter {
id
meta {
key
value
}
}
}
}
}

View File

@@ -13,19 +13,14 @@ export const DELETE_MANGA_METADATA = gql`
mutation DELETE_MANGA_METADATA($input: DeleteMangaMetaInput!) {
deleteMangaMeta(input: $input) {
meta {
mangaId
key
value
manga {
id
meta {
key
value
}
}
}
manga {
id
meta {
mangaId
key
value
}
@@ -93,15 +88,9 @@ export const SET_MANGA_METADATA = gql`
mutation SET_MANGA_METADATA($input: SetMangaMetaInput!) {
setMangaMeta(input: $input) {
meta {
mangaId
key
value
manga {
id
meta {
key
value
}
}
}
}
}

View File

@@ -39,15 +39,9 @@ export const SET_SOURCE_METADATA = gql`
mutation SET_SOURCE_METADATA($input: SetSourceMetaInput!) {
setSourceMeta(input: $input) {
meta {
sourceId
key
value
source {
id
meta {
key
value
}
}
}
}
}