2023-12-12 00:21:00 +08:00
|
|
|
import { gql } from '@apollo/client';
|
|
|
|
|
|
|
|
export interface BreakoutRoom {
|
|
|
|
freeJoin: boolean;
|
|
|
|
shortName: string;
|
|
|
|
sendInvitationToModerators: boolean;
|
|
|
|
sequence: number;
|
|
|
|
showInvitation: boolean;
|
2024-06-13 03:21:31 +08:00
|
|
|
isLastAssignedRoom: boolean;
|
|
|
|
isUserCurrentlyInRoom: boolean;
|
2023-12-12 00:21:00 +08:00
|
|
|
joinURL: string | null;
|
|
|
|
breakoutRoomId: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface GetBreakoutDataResponse {
|
|
|
|
breakoutRoom: BreakoutRoom[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface BreakoutRoomAggregate {
|
|
|
|
aggregate: {
|
|
|
|
count: number;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface GetBreakoutCountResponse {
|
|
|
|
breakoutRoom_aggregate: BreakoutRoomAggregate;
|
|
|
|
}
|
|
|
|
|
2024-07-05 04:00:06 +08:00
|
|
|
export const handleInviteDismissedAt = gql`
|
2024-04-23 05:51:14 +08:00
|
|
|
mutation {
|
2024-07-05 04:00:06 +08:00
|
|
|
breakoutRoomSetInviteDismissed
|
2024-04-23 05:51:14 +08:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2023-12-12 00:21:00 +08:00
|
|
|
export const getBreakoutCount = gql`
|
|
|
|
subscription getBreakoutCount {
|
|
|
|
breakoutRoom_aggregate (where: {showInvitation: {_eq: true}}) {
|
|
|
|
aggregate {
|
|
|
|
count
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const getBreakoutData = gql`
|
|
|
|
subscription getBreakoutData {
|
|
|
|
breakoutRoom {
|
|
|
|
freeJoin
|
|
|
|
shortName
|
|
|
|
sendInvitationToModerators
|
|
|
|
sequence
|
|
|
|
showInvitation
|
2024-06-13 03:21:31 +08:00
|
|
|
isLastAssignedRoom
|
|
|
|
isUserCurrentlyInRoom
|
2023-12-12 00:21:00 +08:00
|
|
|
joinURL
|
|
|
|
breakoutRoomId
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export default {
|
|
|
|
getBreakoutCount,
|
|
|
|
getBreakoutData,
|
|
|
|
};
|