Class: LMSGraphQL::Mutations::Canvas::CreateCommunicationChannel

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

Instance Method Summary collapse

Instance Method Details

#resolve(user_id:, communication_channel_address:, communication_channel_type:, communication_channel_token: nil, skip_confirmation: nil) ⇒ Object



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

def resolve(user_id:, communication_channel_address:, communication_channel_type:, communication_channel_token: nil, skip_confirmation: nil)
  context[:canvas_api].call("CREATE_COMMUNICATION_CHANNEL").proxy(
    "CREATE_COMMUNICATION_CHANNEL",
    {
      "user_id": user_id
    },
    {
      "communication_channel[address]": communication_channel_address,
      "communication_channel[type]": communication_channel_type,
      "communication_channel[token]": communication_channel_token,
      "skip_confirmation": skip_confirmation
    },
  ).parsed_response
end