Class: LMSGraphQL::Resolvers::Canvas::GetSingleTopicCourse

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

Instance Method Summary collapse

Instance Method Details

#resolve(course_id:, topic_id:, include: nil, get_all: false) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/lms_graphql/resolvers/canvas/get_single_topic_courses.rb', line 11

def resolve(course_id:, topic_id:, include: nil, get_all: false)
  result = context[:canvas_api].call("GET_SINGLE_TOPIC_COURSES").proxy(
    "GET_SINGLE_TOPIC_COURSES",
    {
      "course_id": course_id,
      "topic_id": topic_id,
      "include": include            },
    nil,
    get_all,
  )
  get_all ? result : result.parsed_response
end