Class: LMS::GraphQL::Mutations::Canvas::CreateCommunicationChannel

Inherits:
CanvasBaseMutation
  • 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



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

def resolve(user_id:, communication_channel_address:, communication_channel_type:, communication_channel_token: nil, skip_confirmation: nil)
  ctx[:canvas_api].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              },
    nil,
  ).parsed_response
end