API Reference
Pomodoro
Control the built-in Pomodoro timer: read settings, inspect today's progress, and start/pause/stop the current session.
Type Definitions
bash
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
}Operations
query
pomodoroSettings
Get the stored Pomodoro settings (durations, auto-start flags, rounds).
bash
query GetPomodoroSettings {
pomodoroSettings {
workDuration shortBreak longBreak roundsBeforeLongBreak
autoStartBreaks autoStartWork
}
}query
pomodoroToday
Get today's runtime info: rounds completed, current phase, time left, and running state.
bash
query GetPomodoroToday {
pomodoroToday {
date completedCount currentRound timeLeft totalTime isRunning isPause state
}
}mutation
startPomodoro
Start the Pomodoro timer. Pass timeLeft (seconds) to resume from a paused state, or 0 for a fresh start.
bash
mutation StartPomodoro($timeLeft: Int!) {
startPomodoro(timeLeft: $timeLeft)
}mutation
pausePomodoro
Pause the running Pomodoro timer.
bash
mutation PausePomodoro {
pausePomodoro
}mutation
stopPomodoro
Stop the Pomodoro timer and reset the current round.
bash
mutation StopPomodoro {
stopPomodoro
}