Class: LMSGraphQL::Mutations::Canvas::AddMessage

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

Instance Method Summary collapse

Instance Method Details

#resolve(id:, body:, attachment_ids: nil, media_comment_id: nil, media_comment_type: nil, recipients: nil, included_messages: nil, user_note: nil) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/lms_graphql/mutations/canvas/add_message.rb', line 19

def resolve(id:, body:, attachment_ids: nil, media_comment_id: nil, media_comment_type: nil, recipients: nil, included_messages: nil, user_note: nil)
  context[:canvas_api].call("ADD_MESSAGE").proxy(
    "ADD_MESSAGE",
    {
      "id": id
    },
    {
      "body": body,
      "attachment_ids": attachment_ids,
      "media_comment_id": media_comment_id,
      "media_comment_type": media_comment_type,
      "recipients": recipients,
      "included_messages": included_messages,
      "user_note": user_note
    },
  ).parsed_response
end