Class: LMS::GraphQL::Mutations::Canvas::CreateSinglePollSession

Inherits:
CanvasBaseMutation
  • Object
show all
Defined in:
lib/lms/graphql/mutations/canvas/create_single_poll_session.rb

Instance Method Summary collapse

Instance Method Details

#resolve(poll_id:, poll_sessions_course_id:, poll_sessions_course_section_id: nil, poll_sessions_has_public_results: nil) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/lms/graphql/mutations/canvas/create_single_poll_session.rb', line 13

def resolve(poll_id:, poll_sessions_course_id:, poll_sessions_course_section_id: nil, poll_sessions_has_public_results: nil)
  ctx[:canvas_api].proxy(
    "CREATE_SINGLE_POLL_SESSION",
    {
      "poll_id": poll_id,
      "poll_sessions[course_id]": poll_sessions_course_id,
      "poll_sessions[course_section_id]": poll_sessions_course_section_id,
      "poll_sessions[has_public_results]": poll_sessions_has_public_results              },
    nil,
  ).parsed_response
end