2023-09-25 21:04:28 +08:00
|
|
|
import { gql } from '@apollo/client';
|
|
|
|
|
2024-04-23 03:59:32 +08:00
|
|
|
export interface TimerData {
|
|
|
|
accumulated: number;
|
|
|
|
active: boolean;
|
|
|
|
songTrack: string;
|
|
|
|
time: number;
|
|
|
|
stopwatch: boolean;
|
|
|
|
running: boolean;
|
|
|
|
startedOn: number;
|
|
|
|
endedOn: number;
|
2024-04-23 12:00:54 +08:00
|
|
|
startedAt: string;
|
2024-04-23 03:59:32 +08:00
|
|
|
}
|
|
|
|
|
2023-09-25 21:04:28 +08:00
|
|
|
export interface GetTimerResponse {
|
2024-04-23 03:59:32 +08:00
|
|
|
timer: Array<TimerData>;
|
2023-09-25 21:04:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export const GET_TIMER = gql`
|
2024-03-28 23:09:37 +08:00
|
|
|
subscription Timer {
|
2023-09-25 21:04:28 +08:00
|
|
|
timer {
|
|
|
|
accumulated
|
|
|
|
active
|
|
|
|
songTrack
|
|
|
|
time
|
|
|
|
stopwatch
|
|
|
|
running
|
2024-03-01 01:29:46 +08:00
|
|
|
startedOn
|
2024-04-23 12:00:54 +08:00
|
|
|
startedAt
|
2024-03-01 01:29:46 +08:00
|
|
|
endedOn
|
2023-09-25 21:04:28 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export default GET_TIMER;
|