bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/waiting-users/waiting-users-graphql/queries.ts
Tainan Felipe f05cfd0cf8
Refactor: migrate waitingUserPanel to TS and graphql (#18677)
* Refactor: migrate waitingUserPanel to TS and graphql

* Small code improvements

* Fix: allow everyone aren't working

* Fix: add a condition for edge cases

* Make the remember choice works well

* Fix TS and eslint errors

* Change eslint

* Change eslint
2023-10-06 14:12:42 -03:00

37 lines
695 B
TypeScript

import { gql } from '@apollo/client';
import { User } from '/imports/ui/Types/user';
export type GuestWaitingUser = {
isAllowed: boolean
guestLobbyMessage: string | null;
isDenied: boolean;
user: Partial<User>;
};
export interface GuestWaitingUsers {
user_guest: Array<GuestWaitingUser>
}
export const GET_GUEST_WAITING_USERS_SUBSCRIPTION = gql`
subscription getGuestWaitingUsers {
user_guest(where: {isWaiting: {_eq: true}}) {
guestLobbyMessage
isAllowed
isDenied
userId
user {
authed
userId
name
color
role
avatar
}
}
}
`;
export default {
GET_GUEST_WAITING_USERS_SUBSCRIPTION,
};