2024-02-23 23:01:53 +08:00
|
|
|
import { gql } from '@apollo/client';
|
|
|
|
import { User } from '../../Types/user';
|
|
|
|
|
|
|
|
export interface getVideoDataResponse {
|
|
|
|
user: Array<Pick<User, 'loggedOut'| 'away'| 'disconnected'| 'emoji'| 'name'>>
|
|
|
|
}
|
|
|
|
export type queryUser = Pick<User, 'loggedOut'| 'away'| 'disconnected'| 'emoji'| 'name'>
|
|
|
|
|
|
|
|
export const getVideoData = gql`
|
|
|
|
subscription getvideoData($userIds: [String]!) {
|
|
|
|
user(where: {userId: {_in: $userIds}}) {
|
|
|
|
loggedOut
|
|
|
|
away
|
|
|
|
disconnected
|
|
|
|
emoji
|
|
|
|
name
|
2024-04-17 20:27:10 +08:00
|
|
|
nameSortable
|
2024-02-23 23:01:53 +08:00
|
|
|
role
|
|
|
|
avatar
|
|
|
|
color
|
|
|
|
presenter
|
|
|
|
clientType
|
|
|
|
userId
|
|
|
|
raiseHand
|
2024-03-12 21:24:37 +08:00
|
|
|
isModerator
|
2024-06-10 20:48:38 +08:00
|
|
|
reactionEmoji
|
2024-02-23 23:01:53 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const getVideoDataGrid = gql`
|
|
|
|
subscription getVideoDataGrid {
|
|
|
|
user {
|
|
|
|
loggedOut
|
|
|
|
away
|
|
|
|
disconnected
|
|
|
|
emoji
|
|
|
|
name
|
2024-04-17 20:27:10 +08:00
|
|
|
nameSortable
|
2024-02-23 23:01:53 +08:00
|
|
|
role
|
|
|
|
avatar
|
|
|
|
color
|
|
|
|
presenter
|
|
|
|
clientType
|
|
|
|
userId
|
|
|
|
raiseHand
|
2024-06-10 20:48:38 +08:00
|
|
|
reactionEmoji
|
2024-02-23 23:01:53 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export default {
|
|
|
|
getVideoData,
|
|
|
|
getVideoDataGrid,
|
|
|
|
};
|