Class: LMSGraphQL::Resolvers::Canvas::GetPreferenceType

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

Instance Method Summary collapse

Instance Method Details

#resolve(user_id:, type:, address:, notification:, get_all: false) ⇒ Object



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

def resolve(user_id:, type:, address:, notification:, get_all: false)
  result = context[:canvas_api].call("GET_PREFERENCE_TYPE").proxy(
    "GET_PREFERENCE_TYPE",
    {
      "user_id": user_id,
      "type": type,
      "address": address,
      "notification": notification            },
    nil,
    get_all,
  )
  get_all ? result : result.parsed_response
end