Class: LMSGraphQL::Mutations::Canvas::UpdateSinglePoll

Inherits:
BaseMutation
  • Object
show all
Defined in:
lib/lms_graphql/mutations/canvas/update_single_poll.rb

Instance Method Summary collapse

Instance Method Details

#resolve(id:, polls_question:, polls_description: nil) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/lms_graphql/mutations/canvas/update_single_poll.rb', line 14

def resolve(id:, polls_question:, polls_description: nil)
  context[:canvas_api].call("UPDATE_SINGLE_POLL").proxy(
    "UPDATE_SINGLE_POLL",
    {
      "id": id
    },
    {
      "polls[question]": polls_question,
      "polls[description]": polls_description
    },
  ).parsed_response
end