Class: LMSGraphQL::Resolvers::Canvas::GetSingleRole

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

Instance Method Summary collapse

Instance Method Details

#resolve(id:, account_id:, role_id:, role: nil, get_all: false) ⇒ Object



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

def resolve(id:, account_id:, role_id:, role: nil, get_all: false)
  result = context[:canvas_api].call("GET_SINGLE_ROLE").proxy(
    "GET_SINGLE_ROLE",
    {
      "id": id,
      "account_id": ,
      "role_id": role_id,
      "role": role            },
    nil,
    get_all,
  )
  get_all ? result : result.parsed_response
end