bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/poll/mutations.ts

62 lines
1.2 KiB
TypeScript
Raw Normal View History

2024-01-11 21:37:53 +08:00
import { gql } from '@apollo/client';
export const POLL_PUBLISH_RESULT = gql`
mutation PollPublishResult($pollId: String!) {
pollPublishResult(
pollId: $pollId,
)
}
`;
export const POLL_SUBMIT_TYPED_VOTE = gql`
mutation PollSubmitTypedVote($pollId: String!, $answer: String!) {
pollSubmitUserTypedVote(
pollId: $pollId,
answer: $answer,
)
}
`;
export const POLL_SUBMIT_VOTE = gql`
mutation PollSubmitVote($pollId: String!, $answerIds: [Int]!) {
pollSubmitUserVote(
pollId: $pollId,
answerIds: $answerIds,
)
}
`;
export const POLL_CANCEL = gql`
mutation PollCancel {
pollCancel
}
`;
export const POLL_CREATE = gql`
2024-01-25 04:03:28 +08:00
mutation PollCreate(
$pollType: String!,
$pollId: String!,
$secretPoll: Boolean!,
$question: String!,
$isMultipleResponse: Boolean!,
$answers: [String]!
) {
2024-01-11 21:37:53 +08:00
pollCreate(
pollType: $pollType,
pollId: $pollId,
secretPoll: $secretPoll,
question: $question,
isMultipleResponse: $isMultipleResponse,
answers: $answers,
)
}
`;
export default {
POLL_PUBLISH_RESULT,
POLL_SUBMIT_TYPED_VOTE,
POLL_SUBMIT_VOTE,
POLL_CANCEL,
POLL_CREATE,
};