Class: LMSGraphQL::Mutations::Canvas::UpdatePreferenceType

Inherits:
BaseMutation
  • Object
show all
Defined in:
lib/lms_graphql/mutations/canvas/update_preference_type.rb

Instance Method Summary collapse

Instance Method Details

#resolve(type:, address:, notification:, notification_preferences_frequency:) ⇒ Object



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

def resolve(type:, address:, notification:, notification_preferences_frequency:)
  context[:canvas_api].call("UPDATE_PREFERENCE_TYPE").proxy(
    "UPDATE_PREFERENCE_TYPE",
    {
      "type": type,
      "address": address,
      "notification": notification
    },
    {
      "notification_preferences[frequency]": notification_preferences_frequency
    },
  ).parsed_response
end