Class: LMSGraphQL::Mutations::Canvas::UpdatePreferenceCommunicationChannelId

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

Instance Method Summary collapse

Instance Method Details

#resolve(communication_channel_id:, notification:, notification_preferences_frequency:) ⇒ Object



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

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