Scene Marker grid view (#5443)

* add bulk delete mutation
---------
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
dogwithakeyboard
2024-11-29 06:02:20 +00:00
committed by GitHub
parent 6ad0951878
commit 7f8349469a
16 changed files with 482 additions and 31 deletions

View File

@@ -1499,6 +1499,24 @@ export const useSceneMarkerDestroy = () =>
},
});
export const useSceneMarkersDestroy = (
input: GQL.SceneMarkersDestroyMutationVariables
) =>
GQL.useSceneMarkersDestroyMutation({
variables: input,
update(cache, result) {
if (!result.data?.sceneMarkersDestroy) return;
for (const id of input.ids) {
const obj = { __typename: "SceneMarker", id };
cache.evict({ id: cache.identify(obj) });
}
evictTypeFields(cache, sceneMarkerMutationImpactedTypeFields);
evictQueries(cache, sceneMarkerMutationImpactedQueries);
},
});
const galleryMutationImpactedTypeFields = {
Scene: ["galleries"],
Performer: ["gallery_count", "performer_count"],