Class: LMSGraphQL::Resolvers::Canvas::GetSingleAssignment

Inherits:
CanvasBaseResolver
  • Object
show all
Defined in:
lib/lms_graphql/resolvers/canvas/get_single_assignment.rb

Instance Method Summary collapse

Instance Method Details

#resolve(course_id:, id:, include: nil, override_assignment_dates: nil, needs_grading_count_by_section: nil, all_dates: nil, get_all: false) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/lms_graphql/resolvers/canvas/get_single_assignment.rb', line 14

def resolve(course_id:, id:, include: nil, override_assignment_dates: nil, needs_grading_count_by_section: nil, all_dates: nil, get_all: false)
  result = context[:canvas_api].call("GET_SINGLE_ASSIGNMENT").proxy(
    "GET_SINGLE_ASSIGNMENT",
    {
      "course_id": course_id,
      "id": id,
      "include": include,
      "override_assignment_dates": override_assignment_dates,
      "needs_grading_count_by_section": needs_grading_count_by_section,
      "all_dates": all_dates            },
    nil,
    get_all,
  )
  get_all ? result : result.parsed_response
end