Class: LMSGraphQL::Mutations::Canvas::CreateSinglePoll

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

Instance Method Summary collapse

Instance Method Details

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



13
14
15
16
17
18
19
20
21
22
# File 'lib/lms_graphql/mutations/canvas/create_single_poll.rb', line 13

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