bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/plugins-engine/queries.ts
2023-10-26 16:59:05 -03:00

37 lines
993 B
TypeScript

import { gql } from '@apollo/client';
const PLUGIN_DATA_CHANNEL_DISPATCH_QUERY = gql`
mutation DispatchPluginDataChannelMessageMsg($pluginName: String!,
$dataChannel: String!, $payloadJson: String!, $toRoles: [String]!, $toUserIds: [String]!) {
dispatchPluginDataChannelMessageMsg(
pluginName: $pluginName,
dataChannel: $dataChannel,
payloadJson: $payloadJson,
toRoles: $toRoles,
toUserIds: $toUserIds,
)
}
`;
const PLUGIN_DATA_CHANNEL_FETCH_QUERY = gql`
subscription FetchPluginDataChannelMessageMsg($pluginName: String!, $channelName: String!){
pluginDataChannelMessage(
order_by: {createdAt: asc},
where: {
pluginName: { _eq: $pluginName }
dataChannel: { _eq: $channelName }
}
) {
createdAt,
dataChannel,
messageId,
payloadJson,
fromUserId,
pluginName,
toRoles,
}
}
`;
export { PLUGIN_DATA_CHANNEL_DISPATCH_QUERY, PLUGIN_DATA_CHANNEL_FETCH_QUERY };