15
16
17
18
19
20
21
22
23
24
25
26
27
|
# 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
|