Pomodoro
Bedien de ingebouwde Pomodoro-timer: lees instellingen, bekijk de voortgang van vandaag en start/pauzeer/stop de huidige sessie.
Typedefinities
type PomodoroSettings {
workDuration: Int! # minutes
shortBreak: Int! # minutes
longBreak: Int! # minutes
roundsBeforeLongBreak: Int!
autoStartBreaks: Boolean!
autoStartWork: Boolean!
}
type PomodoroToday {
date: String! # ISO date (YYYY-MM-DD)
completedCount: Int! # completed work rounds today
currentRound: Int!
timeLeft: Int! # seconds remaining in the current phase
totalTime: Int! # seconds elapsed in the current phase
isRunning: Boolean!
isPause: Boolean!
state: PomodoroState! # WORK | SHORT_BREAK | LONG_BREAK | PAUSED
}
enum PomodoroState {
WORK
SHORT_BREAK
LONG_BREAK
PAUSED
}Bewerkingen
pomodoroSettings
Haal de opgeslagen Pomodoro-instellingen op (duuraties, auto-start-flags, rondes).
query GetPomodoroSettings {
pomodoroSettings {
workDuration shortBreak longBreak roundsBeforeLongBreak
autoStartBreaks autoStartWork
}
}pomodoroToday
Haal de runtime-info van vandaag op: voltooide rondes, huidige fase, resterende tijd en uitvoeringsstatus.
query GetPomodoroToday {
pomodoroToday {
date completedCount currentRound timeLeft totalTime isRunning isPause state
}
}startPomodoro
Start de Pomodoro-timer. Geef timeLeft (seconden) door om te hervatten vanuit een gepauzeerde status, of 0 voor een schone start.
mutation StartPomodoro($timeLeft: Int!) {
startPomodoro(timeLeft: $timeLeft)
}pausePomodoro
Pauzeer de actieve Pomodoro-timer.
mutation PausePomodoro {
pausePomodoro
}stopPomodoro
Stop de Pomodoro-timer en reset de huidige ronde.
mutation StopPomodoro {
stopPomodoro
}