Fix graphql and other things

This commit is contained in:
Gregory Schier
2023-03-15 09:06:56 -07:00
parent 951ed787fa
commit 8915915c47
15 changed files with 77 additions and 56 deletions

View File

@@ -7,11 +7,11 @@ export function useDeleteRequest(request: HttpRequest | null) {
const queryClient = useQueryClient();
return useMutation<void, string>({
mutationFn: async () => {
if (request == null) return;
if (!request) return;
await invoke('delete_request', { requestId: request.id });
},
onSuccess: async () => {
if (request == null) return;
if (!request) return;
await queryClient.invalidateQueries(requestsQueryKey(request.workspaceId));
},
});