API 참조
Pomodoro
내장된 Pomodoro 타이머 제어: 설정 읽기, 오늘의 진행 상황 검사, 현재 세션 시작/일시정지/중지.
타입 정의
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
}작업
query
pomodoroSettings
저장된 Pomodoro 설정 (기간, 자동 시작 플래그, 라운드)을 가져옵니다.
bash
query GetPomodoroSettings {
pomodoroSettings {
workDuration shortBreak longBreak roundsBeforeLongBreak
autoStartBreaks autoStartWork
}
}query
pomodoroToday
오늘의 런타임 정보를 가져옵니다: 완료된 라운드, 현재 단계, 남은 시간, 실행 상태.
bash
query GetPomodoroToday {
pomodoroToday {
date completedCount currentRound timeLeft totalTime isRunning isPause state
}
}mutation
startPomodoro
Pomodoro 타이머를 시작합니다. timeLeft (초)를 전달하면 일시정지 상태에서 재개하고, 0을 전달하면 새로 시작합니다.
bash
mutation StartPomodoro($timeLeft: Int!) {
startPomodoro(timeLeft: $timeLeft)
}mutation
pausePomodoro
실행 중인 Pomodoro 타이머를 일시정지합니다.
bash
mutation PausePomodoro {
pausePomodoro
}mutation
stopPomodoro
Pomodoro 타이머를 중지하고 현재 라운드를 재설정합니다.
bash
mutation StopPomodoro {
stopPomodoro
}