16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/lms_graphql/mutations/canvas/update_single_poll_choice.rb', line 16
def resolve(poll_id:, id:, poll_choices_text:, poll_choices_is_correct: nil, poll_choices_position: nil)
context[:canvas_api].call("UPDATE_SINGLE_POLL_CHOICE").proxy(
"UPDATE_SINGLE_POLL_CHOICE",
{
"poll_id": poll_id,
"id": id
},
{
"poll_choices[text]": poll_choices_text,
"poll_choices[is_correct]": poll_choices_is_correct,
"poll_choices[position]": poll_choices_position
},
).parsed_response
end
|