From 87187cd9153e6b6a817afd5ff268f54e822d45ce Mon Sep 17 00:00:00 2001 From: Joonatan Kuosa Date: Sun, 12 Jan 2025 11:21:06 +0200 Subject: [PATCH] chore: replace deprecated deleteReservation --- .../reservations/UnpaidReservationNotification.tsx | 2 +- apps/ui/gql/gql-types.ts | 8 ++++---- apps/ui/modules/queries/reservation.tsx | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/ui/components/reservations/UnpaidReservationNotification.tsx b/apps/ui/components/reservations/UnpaidReservationNotification.tsx index fecb56e07..1c39eac33 100644 --- a/apps/ui/components/reservations/UnpaidReservationNotification.tsx +++ b/apps/ui/components/reservations/UnpaidReservationNotification.tsx @@ -209,7 +209,7 @@ export function InProgressReservationNotification() { deleteReservation, { data: deleteData, error: deleteError, loading: isDeleteLoading }, ] = useDeleteReservationMutation(); - const deleted = deleteData?.deleteReservation?.deleted; + const deleted = deleteData?.deleteTentativeReservation?.deleted; const order = unpaidReservation?.paymentOrder[0]; const checkoutUrl = getCheckoutUrl(order, i18n.language); diff --git a/apps/ui/gql/gql-types.ts b/apps/ui/gql/gql-types.ts index 39735b219..77f63eadc 100644 --- a/apps/ui/gql/gql-types.ts +++ b/apps/ui/gql/gql-types.ts @@ -6244,11 +6244,11 @@ export type UpdateReservationMutation = { }; export type DeleteReservationMutationVariables = Exact<{ - input: ReservationDeleteMutationInput; + input: ReservationDeleteTentativeMutationInput; }>; export type DeleteReservationMutation = { - deleteReservation?: { deleted?: boolean | null } | null; + deleteTentativeReservation?: { deleted?: boolean | null } | null; }; export type CancelReservationMutationVariables = Exact<{ @@ -10246,8 +10246,8 @@ export type UpdateReservationMutationOptions = Apollo.BaseMutationOptions< UpdateReservationMutationVariables >; export const DeleteReservationDocument = gql` - mutation DeleteReservation($input: ReservationDeleteMutationInput!) { - deleteReservation(input: $input) { + mutation DeleteReservation($input: ReservationDeleteTentativeMutationInput!) { + deleteTentativeReservation(input: $input) { deleted } } diff --git a/apps/ui/modules/queries/reservation.tsx b/apps/ui/modules/queries/reservation.tsx index 198869210..e68e34eae 100644 --- a/apps/ui/modules/queries/reservation.tsx +++ b/apps/ui/modules/queries/reservation.tsx @@ -21,8 +21,8 @@ export const UPDATE_RESERVATION = gql` `; export const DELETE_RESERVATION = gql` - mutation DeleteReservation($input: ReservationDeleteMutationInput!) { - deleteReservation(input: $input) { + mutation DeleteReservation($input: ReservationDeleteTentativeMutationInput!) { + deleteTentativeReservation(input: $input) { deleted } }