class LMSGraphQL::Mutations::Canvas::CreateSinglePollChoice

Public Instance Methods

resolve(poll_id:, poll_choices_text:, poll_choices_is_correct: nil, poll_choices_position: nil) click to toggle source
# File lib/lms_graphql/mutations/canvas/create_single_poll_choice.rb, line 15
def resolve(poll_id:, poll_choices_text:, poll_choices_is_correct: nil, poll_choices_position: nil)
  context[:canvas_api].call("CREATE_SINGLE_POLL_CHOICE").proxy(
    "CREATE_SINGLE_POLL_CHOICE",
    {
      "poll_id": poll_id
    },
    {
      "poll_choices[text]": poll_choices_text,
      "poll_choices[is_correct]": poll_choices_is_correct,
      "poll_choices[position]": poll_choices_position
    },
  ).parsed_response
end