Skip to content

Create the snooze and un-snooze todos mutations

Paul Gascou-Vaillancourt requested to merge 17712-todos-snooze-mutations into master

What does this MR do and why?

Create the snooze and un-snooze todos mutations

This creates boilerplate mutations for snoozing/un-snoozing todos. This is preliminary work so that we can ship the mutations as soon as possible in order to use them in next milestone once the proper resolving logic has been implemented.

Changelog: added

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

N/A

How to set up and validate locally

  1. Navigate to the GraphQL Explorer: http://gdk.test:3000/-/graphql-explorer

  2. Run either mutation. For example:

    mutation SnoozeTodo {
      todoSnooze(
        input: {id: "gid://gitlab/Todo/28", snoozeUntil: "2024-07-23T16:18:54Z"}
      ) {
        todo {
          id
          snoozedUntil
        }
      }
    }
    mutation UnSnoozeTodo {
      todoUnSnooze(input: {id: "gid://gitlab/Todo/28"}) {
        todo {
          id
          snoozedUntil
        }
      }
    }

SQL Queries

Snoozing a todo

Todo UPDATE (0.3ms)
UPDATE
    "todos"
SET
    "updated_at" = '2024-09-10 16:37:21.426890',
    "snoozed_until" = '2024-09-10 16:37:21.426436'
WHERE
    "todos"."id" = 29

Un-snoozing a todo

Todo UPDATE (0.4ms)
UPDATE
    "todos"
SET
    "updated_at" = '2024-09-10 16:38:42.010424',
    "snoozed_until" = NULL
WHERE
    "todos"."id" = 29

Related to #17712

Edited by Paul Gascou-Vaillancourt

Merge request reports

Loading