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

55 lines
1.2 KiB
React
Raw Normal View History

2023-12-09 02:29:05 +08:00
import { gql } from '@apollo/client';
export const POLL_PUBLISH_RESULT = gql`
mutation PollPublishResult($pollId: String!) {
pollPublishResult(
pollId: $pollId,
)
2023-12-09 02:51:41 +08:00
}
`;
export const POLL_SUBMIT_TYPED_VOTE = gql`
mutation PollSubmitTypedVote($pollId: String!, $answer: String!) {
pollSubmitUserTypedVote(
pollId: $pollId,
answer: $answer,
)
}
`;
2023-12-09 02:29:05 +08:00
2023-12-09 03:22:52 +08:00
export const POLL_SUBMIT_VOTE = gql`
mutation PollSubmitVote($pollId: String!, $answerIds: [Int]!) {
pollSubmitUserVote(
pollId: $pollId,
answerIds: $answerIds,
)
}
`;
2023-12-09 04:24:57 +08:00
export const POLL_CANCEL = gql`
mutation PollCancel {
pollCancel
}
`;
2023-12-11 21:31:13 +08:00
export const POLL_CREATE = gql`
mutation PollCreate($pollType: String!, $pollId: String!, $secretPoll: Boolean!, $question: String!, $isMultipleResponse: Boolean!, $answers: [String]!) {
pollCreate(
pollType: $pollType,
pollId: $pollId,
secretPoll: $secretPoll,
question: $question,
isMultipleResponse: $isMultipleResponse,
answers: $answers,
)
}
`;
2023-12-09 02:29:05 +08:00
export default {
POLL_PUBLISH_RESULT,
2023-12-09 02:51:41 +08:00
POLL_SUBMIT_TYPED_VOTE,
2023-12-09 03:22:52 +08:00
POLL_SUBMIT_VOTE,
2023-12-09 04:24:57 +08:00
POLL_CANCEL,
2023-12-11 21:31:13 +08:00
POLL_CREATE,
2023-12-09 02:29:05 +08:00
};