lms-graphql-api 1.1.1 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. checksums.yaml +5 -5
  2. data/lib/lms_graphql/mutations/canvas/add_allowed_domain_to_account.rb +24 -0
  3. data/lib/lms_graphql/mutations/canvas/add_multiple_allowed_domains_to_account.rb +24 -0
  4. data/lib/lms_graphql/mutations/canvas/add_users_to_content_share.rb +26 -0
  5. data/lib/lms_graphql/mutations/canvas/begin_migration_to_push_to_associated_courses.rb +4 -2
  6. data/lib/lms_graphql/mutations/canvas/bulk_update_assignment_dates.rb +21 -0
  7. data/lib/lms_graphql/mutations/canvas/confirm_image_selection.rb +21 -0
  8. data/lib/lms_graphql/mutations/canvas/create_assignment.rb +13 -3
  9. data/lib/lms_graphql/mutations/canvas/create_content_migration_accounts.rb +16 -2
  10. data/lib/lms_graphql/mutations/canvas/create_content_migration_courses.rb +16 -2
  11. data/lib/lms_graphql/mutations/canvas/create_content_migration_groups.rb +16 -2
  12. data/lib/lms_graphql/mutations/canvas/create_content_migration_users.rb +16 -2
  13. data/lib/lms_graphql/mutations/canvas/create_content_share.rb +28 -0
  14. data/lib/lms_graphql/mutations/canvas/create_external_tool_accounts.rb +6 -2
  15. data/lib/lms_graphql/mutations/canvas/create_external_tool_courses.rb +6 -2
  16. data/lib/lms_graphql/mutations/canvas/create_line_item.rb +34 -0
  17. data/lib/lms_graphql/mutations/canvas/create_new_course.rb +3 -1
  18. data/lib/lms_graphql/mutations/canvas/create_observer_pairing_code.rb +21 -0
  19. data/lib/lms_graphql/mutations/canvas/create_originality_report.rb +6 -2
  20. data/lib/lms_graphql/mutations/canvas/create_rubricassociation.rb +38 -0
  21. data/lib/lms_graphql/mutations/canvas/create_score.rb +40 -0
  22. data/lib/lms_graphql/mutations/canvas/create_single_rubric_assessment.rb +32 -0
  23. data/lib/lms_graphql/mutations/canvas/create_user.rb +6 -2
  24. data/lib/lms_graphql/mutations/canvas/create_webhook_subscription.rb +3 -3
  25. data/lib/lms_graphql/mutations/canvas/delete_line_item.rb +23 -0
  26. data/lib/lms_graphql/mutations/canvas/delete_rubricassociation.rb +23 -0
  27. data/lib/lms_graphql/mutations/canvas/delete_single_rubric.rb +23 -0
  28. data/lib/lms_graphql/mutations/canvas/delete_single_rubric_assessment.rb +25 -0
  29. data/lib/lms_graphql/mutations/canvas/deprecated_self_register_user.rb +42 -0
  30. data/lib/lms_graphql/mutations/canvas/edit_assignment.rb +15 -3
  31. data/lib/lms_graphql/mutations/canvas/edit_originality_report_files.rb +4 -2
  32. data/lib/lms_graphql/mutations/canvas/edit_originality_report_submissions.rb +4 -2
  33. data/lib/lms_graphql/mutations/canvas/edit_user_login.rb +4 -2
  34. data/lib/lms_graphql/mutations/canvas/enroll_user_courses.rb +5 -1
  35. data/lib/lms_graphql/mutations/canvas/enroll_user_sections.rb +5 -1
  36. data/lib/lms_graphql/mutations/canvas/import_sis_data.rb +4 -2
  37. data/lib/lms_graphql/mutations/canvas/lock_or_unlock_current_csp_settings_for_sub_accounts_and_courses.rb +24 -0
  38. data/lib/lms_graphql/mutations/canvas/mutations.rb +27 -4
  39. data/lib/lms_graphql/mutations/canvas/remove_content_share.rb +23 -0
  40. data/lib/lms_graphql/mutations/canvas/remove_domain_from_account.rb +23 -0
  41. data/lib/lms_graphql/mutations/canvas/reset_link_verifier.rb +21 -0
  42. data/lib/lms_graphql/mutations/canvas/submit_assignment_courses.rb +6 -2
  43. data/lib/lms_graphql/mutations/canvas/submit_assignment_sections.rb +6 -2
  44. data/lib/lms_graphql/mutations/canvas/update_account.rb +5 -1
  45. data/lib/lms_graphql/mutations/canvas/update_content_share.rb +26 -0
  46. data/lib/lms_graphql/mutations/canvas/update_course.rb +5 -1
  47. data/lib/lms_graphql/mutations/canvas/update_course_settings.rb +10 -2
  48. data/lib/lms_graphql/mutations/canvas/update_line_item.rb +32 -0
  49. data/lib/lms_graphql/mutations/canvas/update_media_object.rb +24 -0
  50. data/lib/lms_graphql/mutations/canvas/update_media_tracks.rb +24 -0
  51. data/lib/lms_graphql/mutations/canvas/update_public_jwk.rb +21 -0
  52. data/lib/lms_graphql/mutations/canvas/update_rubricassociation.rb +40 -0
  53. data/lib/lms_graphql/mutations/canvas/update_single_rubric_assessment.rb +34 -0
  54. data/lib/lms_graphql/resolvers/canvas/course_audit_log_query_by_account.rb +27 -0
  55. data/lib/lms_graphql/resolvers/canvas/find_images.rb +22 -0
  56. data/lib/lms_graphql/resolvers/canvas/get_account.rb +22 -0
  57. data/lib/lms_graphql/resolvers/canvas/get_content_share.rb +24 -0
  58. data/lib/lms_graphql/resolvers/canvas/get_unread_shares_count.rb +22 -0
  59. data/lib/lms_graphql/resolvers/canvas/get_uploaded_media_folder_for_user_courses.rb +22 -0
  60. data/lib/lms_graphql/resolvers/canvas/get_uploaded_media_folder_for_user_groups.rb +22 -0
  61. data/lib/lms_graphql/resolvers/canvas/get_users_most_recently_graded_submissions.rb +29 -0
  62. data/lib/lms_graphql/resolvers/canvas/index_of_active_global_notification_for_user.rb +4 -2
  63. data/lib/lms_graphql/resolvers/canvas/list_active_courses_in_account.rb +6 -2
  64. data/lib/lms_graphql/resolvers/canvas/list_assignments_assignment_groups.rb +4 -2
  65. data/lib/lms_graphql/resolvers/canvas/list_assignments_assignments.rb +4 -2
  66. data/lib/lms_graphql/resolvers/canvas/list_available_tabs_for_course_or_group_accounts.rb +22 -0
  67. data/lib/lms_graphql/resolvers/canvas/list_available_tabs_for_course_or_group_courses.rb +2 -4
  68. data/lib/lms_graphql/resolvers/canvas/list_available_tabs_for_course_or_group_groups.rb +2 -4
  69. data/lib/lms_graphql/resolvers/canvas/list_available_tabs_for_course_or_group_users.rb +22 -0
  70. data/lib/lms_graphql/resolvers/canvas/list_calendar_events_for_user.rb +6 -2
  71. data/lib/lms_graphql/resolvers/canvas/list_conferences_for_current_user.rb +23 -0
  72. data/lib/lms_graphql/resolvers/canvas/list_content_shares_received.rb +23 -0
  73. data/lib/lms_graphql/resolvers/canvas/list_content_shares_sent.rb +23 -0
  74. data/lib/lms_graphql/resolvers/canvas/list_course_memberships.rb +28 -0
  75. data/lib/lms_graphql/resolvers/canvas/list_enrollment_terms.rb +2 -3
  76. data/lib/lms_graphql/resolvers/canvas/list_enrollments_courses.rb +4 -2
  77. data/lib/lms_graphql/resolvers/canvas/list_enrollments_sections.rb +4 -2
  78. data/lib/lms_graphql/resolvers/canvas/list_enrollments_users.rb +4 -2
  79. data/lib/lms_graphql/resolvers/canvas/list_files_courses.rb +3 -1
  80. data/lib/lms_graphql/resolvers/canvas/list_files_folders.rb +3 -1
  81. data/lib/lms_graphql/resolvers/canvas/list_files_groups.rb +3 -1
  82. data/lib/lms_graphql/resolvers/canvas/list_files_users.rb +3 -1
  83. data/lib/lms_graphql/resolvers/canvas/list_group_s_users.rb +4 -2
  84. data/lib/lms_graphql/resolvers/canvas/list_items_for_selective_import_accounts.rb +26 -0
  85. data/lib/lms_graphql/resolvers/canvas/list_items_for_selective_import_courses.rb +26 -0
  86. data/lib/lms_graphql/resolvers/canvas/list_items_for_selective_import_groups.rb +26 -0
  87. data/lib/lms_graphql/resolvers/canvas/list_items_for_selective_import_users.rb +26 -0
  88. data/lib/lms_graphql/resolvers/canvas/list_line_items.rb +30 -0
  89. data/lib/lms_graphql/resolvers/canvas/list_media_objects_courses.rb +29 -0
  90. data/lib/lms_graphql/resolvers/canvas/list_media_objects_media_objects.rb +27 -0
  91. data/lib/lms_graphql/resolvers/canvas/list_media_tracks_for_media_object.rb +25 -0
  92. data/lib/lms_graphql/resolvers/canvas/list_observers.rb +25 -0
  93. data/lib/lms_graphql/resolvers/canvas/list_planner_items_planner.rb +28 -0
  94. data/lib/lms_graphql/resolvers/canvas/list_planner_items_users.rb +30 -0
  95. data/lib/lms_graphql/resolvers/canvas/list_users_in_account.rb +3 -1
  96. data/lib/lms_graphql/resolvers/canvas/list_users_in_course_search_users.rb +3 -1
  97. data/lib/lms_graphql/resolvers/canvas/list_users_in_course_users.rb +3 -1
  98. data/lib/lms_graphql/resolvers/canvas/names_and_role_list_group_memberships.rb +28 -0
  99. data/lib/lms_graphql/resolvers/canvas/retrieve_assignment_overridden_dates_for_classic_quizzes.rb +24 -0
  100. data/lib/lms_graphql/resolvers/canvas/retrieve_assignment_overridden_dates_for_new_quizzes.rb +24 -0
  101. data/lib/lms_graphql/resolvers/canvas/retrieve_enrollment_term.rb +24 -0
  102. data/lib/lms_graphql/resolvers/canvas/retrieve_reported_csp_violations_for_account.rb +22 -0
  103. data/lib/lms_graphql/resolvers/canvas/return_test_student_for_course.rb +22 -0
  104. data/lib/lms_graphql/resolvers/canvas/search_for_content_share_users.rb +25 -0
  105. data/lib/lms_graphql/resolvers/canvas/show_collection_of_results.rb +24 -0
  106. data/lib/lms_graphql/resolvers/canvas/show_line_item.rb +24 -0
  107. data/lib/lms_graphql/resolvers/canvas/show_observer.rb +24 -0
  108. data/lib/lms_graphql/resolvers/canvas/show_result.rb +26 -0
  109. data/lib/lms_graphql/resolvers/canvas/show_user_details.rb +4 -2
  110. data/lib/lms_graphql/resolvers/canvas/update_user_settings.rb +4 -2
  111. data/lib/lms_graphql/types/canvas/account.rb +1 -9
  112. data/lib/lms_graphql/types/canvas/account_input.rb +1 -9
  113. data/lib/lms_graphql/types/canvas/assignment.rb +4 -3
  114. data/lib/lms_graphql/types/canvas/assignment_input.rb +4 -3
  115. data/lib/lms_graphql/types/canvas/assignment_override.rb +1 -1
  116. data/lib/lms_graphql/types/canvas/assignment_override_input.rb +1 -1
  117. data/lib/lms_graphql/types/canvas/blueprint_template.rb +1 -1
  118. data/lib/lms_graphql/types/canvas/blueprint_template_input.rb +1 -1
  119. data/lib/lms_graphql/types/canvas/calendar_event.rb +1 -0
  120. data/lib/lms_graphql/types/canvas/calendar_event_input.rb +1 -0
  121. data/lib/lms_graphql/types/canvas/conference.rb +2 -0
  122. data/lib/lms_graphql/types/canvas/conference_input.rb +2 -0
  123. data/lib/lms_graphql/types/canvas/content_share.rb +24 -0
  124. data/lib/lms_graphql/types/canvas/content_share_input.rb +24 -0
  125. data/lib/lms_graphql/types/canvas/course.rb +2 -1
  126. data/lib/lms_graphql/types/canvas/course_input.rb +2 -1
  127. data/lib/lms_graphql/types/canvas/developer_key.rb +34 -0
  128. data/lib/lms_graphql/types/canvas/developer_key_input.rb +34 -0
  129. data/lib/lms_graphql/types/canvas/enrollment_terms_list.rb +14 -0
  130. data/lib/lms_graphql/types/canvas/enrollment_terms_list_input.rb +14 -0
  131. data/lib/lms_graphql/types/canvas/feature.rb +1 -1
  132. data/lib/lms_graphql/types/canvas/feature_input.rb +1 -1
  133. data/lib/lms_graphql/types/canvas/grade.rb +2 -0
  134. data/lib/lms_graphql/types/canvas/grade_input.rb +2 -0
  135. data/lib/lms_graphql/types/canvas/help_link.rb +2 -2
  136. data/lib/lms_graphql/types/canvas/help_link_input.rb +2 -2
  137. data/lib/lms_graphql/types/canvas/line_item.rb +20 -0
  138. data/lib/lms_graphql/types/canvas/line_item_input.rb +20 -0
  139. data/lib/lms_graphql/types/canvas/media_object.rb +20 -0
  140. data/lib/lms_graphql/types/canvas/media_object_input.rb +20 -0
  141. data/lib/lms_graphql/types/canvas/media_track.rb +22 -0
  142. data/lib/lms_graphql/types/canvas/media_track_input.rb +22 -0
  143. data/lib/lms_graphql/types/canvas/names_and_role_context.rb +16 -0
  144. data/lib/lms_graphql/types/canvas/names_and_role_context_input.rb +16 -0
  145. data/lib/lms_graphql/types/canvas/names_and_role_membership.rb +17 -0
  146. data/lib/lms_graphql/types/canvas/names_and_role_membership_input.rb +17 -0
  147. data/lib/lms_graphql/types/canvas/names_and_role_message.rb +18 -0
  148. data/lib/lms_graphql/types/canvas/names_and_role_message_input.rb +18 -0
  149. data/lib/lms_graphql/types/canvas/originality_report.rb +4 -1
  150. data/lib/lms_graphql/types/canvas/originality_report_input.rb +4 -1
  151. data/lib/lms_graphql/types/canvas/outcome_alignment.rb +2 -1
  152. data/lib/lms_graphql/types/canvas/outcome_alignment_input.rb +2 -1
  153. data/lib/lms_graphql/types/canvas/pairing_code.rb +17 -0
  154. data/lib/lms_graphql/types/canvas/pairing_code_input.rb +17 -0
  155. data/lib/lms_graphql/types/canvas/query_type.rb +148 -12
  156. data/lib/lms_graphql/types/canvas/result.rb +8 -6
  157. data/lib/lms_graphql/types/canvas/result_input.rb +8 -6
  158. data/lib/lms_graphql/types/canvas/rubric.rb +4 -0
  159. data/lib/lms_graphql/types/canvas/rubric_association.rb +23 -0
  160. data/lib/lms_graphql/types/canvas/rubric_association_input.rb +23 -0
  161. data/lib/lms_graphql/types/canvas/rubric_criterion.rb +19 -0
  162. data/lib/lms_graphql/types/canvas/rubric_criterion_input.rb +19 -0
  163. data/lib/lms_graphql/types/canvas/rubric_input.rb +4 -0
  164. data/lib/lms_graphql/types/canvas/rubric_rating.rb +6 -5
  165. data/lib/lms_graphql/types/canvas/rubric_rating_input.rb +6 -5
  166. data/lib/lms_graphql/types/canvas/score.rb +20 -0
  167. data/lib/lms_graphql/types/canvas/score_input.rb +20 -0
  168. data/lib/lms_graphql/types/canvas/submission.rb +7 -3
  169. data/lib/lms_graphql/types/canvas/submission_input.rb +7 -3
  170. data/lib/lms_graphql/types/canvas_forward_declarations.rb +34 -0
  171. data/lib/lms_graphql/types/date_time_type.rb +8 -5
  172. data/lib/lms_graphql/version.rb +1 -1
  173. metadata +92 -4
@@ -0,0 +1,28 @@
1
+ require_relative "../canvas_base_resolver"
2
+ require_relative "../../types/canvas/names_and_role_membership"
3
+ module LMSGraphQL
4
+ module Resolvers
5
+ module Canvas
6
+ class NamesAndRoleListGroupMembership < CanvasBaseResolver
7
+ type LMSGraphQL::Types::Canvas::CanvasNamesAndRoleMembership, null: false
8
+ argument :group_id, ID, required: true
9
+ argument :`rlid`, String, required: false
10
+ argument :role, String, required: false
11
+ argument :limit, String, required: false
12
+ def resolve(group_id:, `rlid`: nil, role: nil, limit: nil, get_all: false)
13
+ result = context[:canvas_api].call("NAMES_AND_ROLE_LIST_GROUP_MEMBERSHIPS").proxy(
14
+ "NAMES_AND_ROLE_LIST_GROUP_MEMBERSHIPS",
15
+ {
16
+ "group_id": group_id,
17
+ "`rlid`": `rlid`,
18
+ "role": role,
19
+ "limit": limit },
20
+ nil,
21
+ get_all,
22
+ )
23
+ get_all ? result : result.parsed_response
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,24 @@
1
+ require_relative "../canvas_base_resolver"
2
+ require_relative "../../types/canvas/quiz_assignment_override_set_container"
3
+ module LMSGraphQL
4
+ module Resolvers
5
+ module Canvas
6
+ class RetrieveAssignmentOverriddenDatesForClassicQuiz < CanvasBaseResolver
7
+ type LMSGraphQL::Types::Canvas::CanvasQuizAssignmentOverrideSetContainer, null: false
8
+ argument :course_id, ID, required: true
9
+ argument :quiz_assignment_overrides_0_quiz_ids, Int, required: false
10
+ def resolve(course_id:, quiz_assignment_overrides_0_quiz_ids: nil, get_all: false)
11
+ result = context[:canvas_api].call("RETRIEVE_ASSIGNMENT_OVERRIDDEN_DATES_FOR_CLASSIC_QUIZZES").proxy(
12
+ "RETRIEVE_ASSIGNMENT_OVERRIDDEN_DATES_FOR_CLASSIC_QUIZZES",
13
+ {
14
+ "course_id": course_id,
15
+ "quiz_assignment_overrides[0][quiz_ids]": quiz_assignment_overrides_0_quiz_ids },
16
+ nil,
17
+ get_all,
18
+ )
19
+ get_all ? result : result.parsed_response
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,24 @@
1
+ require_relative "../canvas_base_resolver"
2
+ require_relative "../../types/canvas/quiz_assignment_override_set_container"
3
+ module LMSGraphQL
4
+ module Resolvers
5
+ module Canvas
6
+ class RetrieveAssignmentOverriddenDatesForNewQuiz < CanvasBaseResolver
7
+ type LMSGraphQL::Types::Canvas::CanvasQuizAssignmentOverrideSetContainer, null: false
8
+ argument :course_id, ID, required: true
9
+ argument :quiz_assignment_overrides_0_quiz_ids, Int, required: false
10
+ def resolve(course_id:, quiz_assignment_overrides_0_quiz_ids: nil, get_all: false)
11
+ result = context[:canvas_api].call("RETRIEVE_ASSIGNMENT_OVERRIDDEN_DATES_FOR_NEW_QUIZZES").proxy(
12
+ "RETRIEVE_ASSIGNMENT_OVERRIDDEN_DATES_FOR_NEW_QUIZZES",
13
+ {
14
+ "course_id": course_id,
15
+ "quiz_assignment_overrides[0][quiz_ids]": quiz_assignment_overrides_0_quiz_ids },
16
+ nil,
17
+ get_all,
18
+ )
19
+ get_all ? result : result.parsed_response
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,24 @@
1
+ require_relative "../canvas_base_resolver"
2
+ require_relative "../../types/canvas/enrollment_term"
3
+ module LMSGraphQL
4
+ module Resolvers
5
+ module Canvas
6
+ class RetrieveEnrollmentTerm < CanvasBaseResolver
7
+ type LMSGraphQL::Types::Canvas::CanvasEnrollmentTerm, null: false
8
+ argument :account_id, ID, required: true
9
+ argument :id, ID, required: true
10
+ def resolve(account_id:, id:, get_all: false)
11
+ result = context[:canvas_api].call("RETRIEVE_ENROLLMENT_TERM").proxy(
12
+ "RETRIEVE_ENROLLMENT_TERM",
13
+ {
14
+ "account_id": account_id,
15
+ "id": id },
16
+ nil,
17
+ get_all,
18
+ )
19
+ get_all ? result : result.parsed_response
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,22 @@
1
+ require_relative "../canvas_base_resolver"
2
+
3
+ module LMSGraphQL
4
+ module Resolvers
5
+ module Canvas
6
+ class RetrieveReportedCspViolationsForAccount < CanvasBaseResolver
7
+ type Boolean, null: false
8
+ argument :account_id, ID, required: true
9
+ def resolve(account_id:, get_all: false)
10
+ result = context[:canvas_api].call("RETRIEVE_REPORTED_CSP_VIOLATIONS_FOR_ACCOUNT").proxy(
11
+ "RETRIEVE_REPORTED_CSP_VIOLATIONS_FOR_ACCOUNT",
12
+ {
13
+ "account_id": account_id },
14
+ nil,
15
+ get_all,
16
+ )
17
+ get_all ? result : result.parsed_response
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ require_relative "../canvas_base_resolver"
2
+ require_relative "../../types/canvas/user"
3
+ module LMSGraphQL
4
+ module Resolvers
5
+ module Canvas
6
+ class ReturnTestStudentForCourse < CanvasBaseResolver
7
+ type LMSGraphQL::Types::Canvas::CanvasUser, null: false
8
+ argument :course_id, ID, required: true
9
+ def resolve(course_id:, get_all: false)
10
+ result = context[:canvas_api].call("RETURN_TEST_STUDENT_FOR_COURSE").proxy(
11
+ "RETURN_TEST_STUDENT_FOR_COURSE",
12
+ {
13
+ "course_id": course_id },
14
+ nil,
15
+ get_all,
16
+ )
17
+ get_all ? result : result.parsed_response
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,25 @@
1
+ require_relative "../canvas_base_resolver"
2
+ require_relative "../../types/canvas/user"
3
+ module LMSGraphQL
4
+ module Resolvers
5
+ module Canvas
6
+ class SearchForContentShareUser < CanvasBaseResolver
7
+ type [LMSGraphQL::Types::Canvas::CanvasUser], null: false
8
+ argument :get_all, Boolean, required: false
9
+ argument :course_id, ID, required: true
10
+ argument :search_term, String, required: true
11
+ def resolve(course_id:, search_term:, get_all: false)
12
+ result = context[:canvas_api].call("SEARCH_FOR_CONTENT_SHARE_USERS").proxy(
13
+ "SEARCH_FOR_CONTENT_SHARE_USERS",
14
+ {
15
+ "course_id": course_id,
16
+ "search_term": search_term },
17
+ nil,
18
+ get_all,
19
+ )
20
+ get_all ? result : result.parsed_response
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,24 @@
1
+ require_relative "../canvas_base_resolver"
2
+ require_relative "../../types/canvas/result"
3
+ module LMSGraphQL
4
+ module Resolvers
5
+ module Canvas
6
+ class ShowCollectionOfResult < CanvasBaseResolver
7
+ type LMSGraphQL::Types::Canvas::CanvasResult, null: false
8
+ argument :course_id, ID, required: true
9
+ argument :line_item_id, ID, required: true
10
+ def resolve(course_id:, line_item_id:, get_all: false)
11
+ result = context[:canvas_api].call("SHOW_COLLECTION_OF_RESULTS").proxy(
12
+ "SHOW_COLLECTION_OF_RESULTS",
13
+ {
14
+ "course_id": course_id,
15
+ "line_item_id": line_item_id },
16
+ nil,
17
+ get_all,
18
+ )
19
+ get_all ? result : result.parsed_response
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,24 @@
1
+ require_relative "../canvas_base_resolver"
2
+ require_relative "../../types/canvas/line_item"
3
+ module LMSGraphQL
4
+ module Resolvers
5
+ module Canvas
6
+ class ShowLineItem < CanvasBaseResolver
7
+ type LMSGraphQL::Types::Canvas::CanvasLineItem, null: false
8
+ argument :course_id, ID, required: true
9
+ argument :id, ID, required: true
10
+ def resolve(course_id:, id:, get_all: false)
11
+ result = context[:canvas_api].call("SHOW_LINE_ITEM").proxy(
12
+ "SHOW_LINE_ITEM",
13
+ {
14
+ "course_id": course_id,
15
+ "id": id },
16
+ nil,
17
+ get_all,
18
+ )
19
+ get_all ? result : result.parsed_response
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,24 @@
1
+ require_relative "../canvas_base_resolver"
2
+ require_relative "../../types/canvas/user"
3
+ module LMSGraphQL
4
+ module Resolvers
5
+ module Canvas
6
+ class ShowObserver < CanvasBaseResolver
7
+ type LMSGraphQL::Types::Canvas::CanvasUser, null: false
8
+ argument :user_id, ID, required: true
9
+ argument :observer_id, ID, required: true
10
+ def resolve(user_id:, observer_id:, get_all: false)
11
+ result = context[:canvas_api].call("SHOW_OBSERVER").proxy(
12
+ "SHOW_OBSERVER",
13
+ {
14
+ "user_id": user_id,
15
+ "observer_id": observer_id },
16
+ nil,
17
+ get_all,
18
+ )
19
+ get_all ? result : result.parsed_response
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,26 @@
1
+ require_relative "../canvas_base_resolver"
2
+ require_relative "../../types/canvas/result"
3
+ module LMSGraphQL
4
+ module Resolvers
5
+ module Canvas
6
+ class ShowResult < CanvasBaseResolver
7
+ type LMSGraphQL::Types::Canvas::CanvasResult, null: false
8
+ argument :course_id, ID, required: true
9
+ argument :line_item_id, ID, required: true
10
+ argument :id, ID, required: true
11
+ def resolve(course_id:, line_item_id:, id:, get_all: false)
12
+ result = context[:canvas_api].call("SHOW_RESULT").proxy(
13
+ "SHOW_RESULT",
14
+ {
15
+ "course_id": course_id,
16
+ "line_item_id": line_item_id,
17
+ "id": id },
18
+ nil,
19
+ get_all,
20
+ )
21
+ get_all ? result : result.parsed_response
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -6,11 +6,13 @@ module LMSGraphQL
6
6
  class ShowUserDetail < CanvasBaseResolver
7
7
  type LMSGraphQL::Types::Canvas::CanvasUser, null: false
8
8
  argument :id, ID, required: true
9
- def resolve(id:, get_all: false)
9
+ argument :include, String, required: false
10
+ def resolve(id:, include: nil, get_all: false)
10
11
  result = context[:canvas_api].call("SHOW_USER_DETAILS").proxy(
11
12
  "SHOW_USER_DETAILS",
12
13
  {
13
- "id": id },
14
+ "id": id,
15
+ "include": include },
14
16
  nil,
15
17
  get_all,
16
18
  )
@@ -8,13 +8,15 @@ module LMSGraphQL
8
8
  argument :id, ID, required: true
9
9
  argument :manual_mark_as_read, Boolean, required: false
10
10
  argument :collapse_global_nav, Boolean, required: false
11
- def resolve(id:, manual_mark_as_read: nil, collapse_global_nav: nil, get_all: false)
11
+ argument :hide_dashcard_color_overlays, Boolean, required: false
12
+ def resolve(id:, manual_mark_as_read: nil, collapse_global_nav: nil, hide_dashcard_color_overlays: nil, get_all: false)
12
13
  result = context[:canvas_api].call("UPDATE_USER_SETTINGS").proxy(
13
14
  "UPDATE_USER_SETTINGS",
14
15
  {
15
16
  "id": id,
16
17
  "manual_mark_as_read": manual_mark_as_read,
17
- "collapse_global_nav": collapse_global_nav },
18
+ "collapse_global_nav": collapse_global_nav,
19
+ "hide_dashcard_color_overlays": hide_dashcard_color_overlays },
18
20
  nil,
19
21
  get_all,
20
22
  )
@@ -5,20 +5,12 @@ module LMSGraphQL
5
5
  module Types
6
6
  module Canvas
7
7
  class CanvasAccount < BaseType
8
- description "Accounts. API Docs: https://canvas.instructure.com/doc/api/accounts.html"
8
+ description "Accounts (LTI). API Docs: https://canvas.instructure.com/doc/api/accounts_(lti).html"
9
9
  field :id, ID, "the ID of the Account object.Example: 2", null: true
10
10
  field :name, String, "The display name of the account.Example: Canvas Account", null: true
11
11
  field :uuid, String, "The UUID of the account.Example: WvAHhY5FINzq5IyRIJybGeiXyFkG3SqHUPb7jZY5", null: true
12
12
  field :parent_account_id, ID, "The account's parent ID, or null if this is the root account.Example: 1", null: true
13
13
  field :root_account_id, ID, "The ID of the root account, or null if this is the root account.Example: 1", null: true
14
- field :default_storage_quota_mb, Int, "The storage quota for the account in megabytes, if not otherwise specified.Example: 500", null: true
15
- field :default_user_storage_quota_mb, Int, "The storage quota for a user in the account in megabytes, if not otherwise specified.Example: 50", null: true
16
- field :default_group_storage_quota_mb, Int, "The storage quota for a group in the account in megabytes, if not otherwise specified.Example: 50", null: true
17
- field :default_time_zone, String, "The default time zone of the account. Allowed time zones are {http://www.iana.org/time-zones IANA time zones} or friendlier {http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html Ruby on Rails time zones}..Example: America/Denver", null: true
18
- field :sis_account_id, ID, "The account's identifier in the Student Information System. Only included if the user has permission to view SIS information..Example: 123xyz", null: true
19
- field :integration_id, ID, "The account's identifier in the Student Information System. Only included if the user has permission to view SIS information..Example: 123xyz", null: true
20
- field :sis_import_id, ID, "The id of the SIS import if created through SIS. Only included if the user has permission to manage SIS information..Example: 12", null: true
21
- field :lti_guid, String, "The account's identifier that is sent as context_id in LTI launches..Example: 123xyz", null: true
22
14
  field :workflow_state, String, "The state of the account. Can be 'active' or 'deleted'..Example: active", null: true
23
15
 
24
16
  end
@@ -5,20 +5,12 @@ module LMSGraphQL
5
5
  module Types
6
6
  module Canvas
7
7
  class CanvasAccountInput < BaseInputObject
8
- description "Accounts. API Docs: https://canvas.instructure.com/doc/api/accounts.html"
8
+ description "Accounts (LTI). API Docs: https://canvas.instructure.com/doc/api/accounts_(lti).html"
9
9
  argument :id, ID, "the ID of the Account object.Example: 2", required: false
10
10
  argument :name, String, "The display name of the account.Example: Canvas Account", required: false
11
11
  argument :uuid, String, "The UUID of the account.Example: WvAHhY5FINzq5IyRIJybGeiXyFkG3SqHUPb7jZY5", required: false
12
12
  argument :parent_account_id, ID, "The account's parent ID, or null if this is the root account.Example: 1", required: false
13
13
  argument :root_account_id, ID, "The ID of the root account, or null if this is the root account.Example: 1", required: false
14
- argument :default_storage_quota_mb, Int, "The storage quota for the account in megabytes, if not otherwise specified.Example: 500", required: false
15
- argument :default_user_storage_quota_mb, Int, "The storage quota for a user in the account in megabytes, if not otherwise specified.Example: 50", required: false
16
- argument :default_group_storage_quota_mb, Int, "The storage quota for a group in the account in megabytes, if not otherwise specified.Example: 50", required: false
17
- argument :default_time_zone, String, "The default time zone of the account. Allowed time zones are {http://www.iana.org/time-zones IANA time zones} or friendlier {http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html Ruby on Rails time zones}..Example: America/Denver", required: false
18
- argument :sis_account_id, ID, "The account's identifier in the Student Information System. Only included if the user has permission to view SIS information..Example: 123xyz", required: false
19
- argument :integration_id, ID, "The account's identifier in the Student Information System. Only included if the user has permission to view SIS information..Example: 123xyz", required: false
20
- argument :sis_import_id, ID, "The id of the SIS import if created through SIS. Only included if the user has permission to manage SIS information..Example: 12", required: false
21
- argument :lti_guid, String, "The account's identifier that is sent as context_id in LTI launches..Example: 123xyz", required: false
22
14
  argument :workflow_state, String, "The state of the account. Can be 'active' or 'deleted'..Example: active", required: false
23
15
 
24
16
  end
@@ -67,9 +67,9 @@ module LMSGraphQL
67
67
  field :position, Int, "the sorting order of the assignment in the group.Example: 1", null: true
68
68
  field :post_to_sis, Boolean, "(optional, present if Sync Grades to SIS feature is enabled).Example: true", null: true
69
69
  field :integration_id, ID, "(optional, Third Party unique identifier for Assignment).Example: 12341234", null: true
70
- field :integration_data, String, "(optional, Third Party integration data for assignment).Example: 12341234", null: true
71
- field :muted, Boolean, "whether the assignment is muted.", null: true
72
- field :points_possible, Int, "the maximum points possible for the assignment.Example: 12", null: true
70
+ field :integration_data, String, "(optional, Third Party integration data for assignment).Example: 0954", null: true
71
+ field :muted, Boolean, "For courses using Old Gradebook, indicates whether the assignment is muted. For courses using New Gradebook, true if the assignment has any unposted submissions, otherwise false. To see the posted status of submissions, check the 'posted_attribute' on Submission..", null: true
72
+ field :points_possible, Float, "the maximum points possible for the assignment.Example: 12.0", null: true
73
73
  field :submission_types, AssignmentSubmissionTypeEnum, "the types of submissions allowed for this assignment list containing one or more of the following: 'discussion_topic', 'online_quiz', 'on_paper', 'none', 'external_tool', 'online_text_entry', 'online_url', 'online_upload' 'media_recording'.Example: online_text_entry", null: true
74
74
  field :has_submitted_submissions, Boolean, "If true, the assignment has been submitted to by at least one student.Example: true", null: true
75
75
  field :grading_type, AssignmentGradingTypeEnum, "The type of grading the assignment receives; one of 'pass_fail', 'percent', 'letter_grade', 'gpa_scale', 'points'.Example: points", null: true
@@ -101,6 +101,7 @@ module LMSGraphQL
101
101
  field :grader_names_visible_to_final_grader, Boolean, "Boolean indicating if provisional grader identities are visible to the final grader. Only relevant for moderated assignments..Example: true", null: true
102
102
  field :anonymous_grading, Boolean, "Boolean indicating if the assignment is graded anonymously. If true, graders cannot see student identities..Example: true", null: true
103
103
  field :allowed_attempts, Int, "The number of submission attempts a student can make for this assignment. -1 is considered unlimited..Example: 2", null: true
104
+ field :post_manually, Boolean, "Whether the assignment has manual posting enabled. Only relevant for courses using New Gradebook..Example: true", null: true
104
105
 
105
106
  end
106
107
  end
@@ -67,9 +67,9 @@ module LMSGraphQL
67
67
  argument :position, Int, "the sorting order of the assignment in the group.Example: 1", required: false
68
68
  argument :post_to_sis, Boolean, "(optional, present if Sync Grades to SIS feature is enabled).Example: true", required: false
69
69
  argument :integration_id, ID, "(optional, Third Party unique identifier for Assignment).Example: 12341234", required: false
70
- argument :integration_data, String, "(optional, Third Party integration data for assignment).Example: 12341234", required: false
71
- argument :muted, Boolean, "whether the assignment is muted.", required: false
72
- argument :points_possible, Int, "the maximum points possible for the assignment.Example: 12", required: false
70
+ argument :integration_data, String, "(optional, Third Party integration data for assignment).Example: 0954", required: false
71
+ argument :muted, Boolean, "For courses using Old Gradebook, indicates whether the assignment is muted. For courses using New Gradebook, true if the assignment has any unposted submissions, otherwise false. To see the posted status of submissions, check the 'posted_attribute' on Submission..", required: false
72
+ argument :points_possible, Float, "the maximum points possible for the assignment.Example: 12.0", required: false
73
73
  argument :submission_types, AssignmentSubmissionTypeEnum, "the types of submissions allowed for this assignment list containing one or more of the following: 'discussion_topic', 'online_quiz', 'on_paper', 'none', 'external_tool', 'online_text_entry', 'online_url', 'online_upload' 'media_recording'.Example: online_text_entry", required: false
74
74
  argument :has_submitted_submissions, Boolean, "If true, the assignment has been submitted to by at least one student.Example: true", required: false
75
75
  argument :grading_type, AssignmentGradingTypeEnum, "The type of grading the assignment receives; one of 'pass_fail', 'percent', 'letter_grade', 'gpa_scale', 'points'.Example: points", required: false
@@ -101,6 +101,7 @@ module LMSGraphQL
101
101
  argument :grader_names_visible_to_final_grader, Boolean, "Boolean indicating if provisional grader identities are visible to the final grader. Only relevant for moderated assignments..Example: true", required: false
102
102
  argument :anonymous_grading, Boolean, "Boolean indicating if the assignment is graded anonymously. If true, graders cannot see student identities..Example: true", required: false
103
103
  argument :allowed_attempts, Int, "The number of submission attempts a student can make for this assignment. -1 is considered unlimited..Example: 2", required: false
104
+ argument :post_manually, Boolean, "Whether the assignment has manual posting enabled. Only relevant for courses using New Gradebook..Example: true", required: false
104
105
 
105
106
  end
106
107
  end
@@ -13,7 +13,7 @@ module LMSGraphQL
13
13
  field :course_section_id, ID, "the ID of the overrides's target section (present if the override targets a section).Example: 1", null: true
14
14
  field :title, String, "the title of the override.Example: an assignment override", null: true
15
15
  field :due_at, LMSGraphQL::Types::DateTimeType, "the overridden due at (present if due_at is overridden).Example: 2012-07-01T23:59:00-06:00", null: true
16
- field :all_day, Int, "the overridden all day flag (present if due_at is overridden).Example: true", null: true
16
+ field :all_day, Boolean, "the overridden all day flag (present if due_at is overridden).Example: true", null: true
17
17
  field :all_day_date, LMSGraphQL::Types::DateTimeType, "the overridden all day date (present if due_at is overridden).Example: 2012-07-01", null: true
18
18
  field :unlock_at, LMSGraphQL::Types::DateTimeType, "the overridden unlock at (present if unlock_at is overridden).Example: 2012-07-01T23:59:00-06:00", null: true
19
19
  field :lock_at, LMSGraphQL::Types::DateTimeType, "the overridden lock at, if any (present if lock_at is overridden).Example: 2012-07-01T23:59:00-06:00", null: true
@@ -13,7 +13,7 @@ module LMSGraphQL
13
13
  argument :course_section_id, ID, "the ID of the overrides's target section (present if the override targets a section).Example: 1", required: false
14
14
  argument :title, String, "the title of the override.Example: an assignment override", required: false
15
15
  argument :due_at, LMSGraphQL::Types::DateTimeType, "the overridden due at (present if due_at is overridden).Example: 2012-07-01T23:59:00-06:00", required: false
16
- argument :all_day, Int, "the overridden all day flag (present if due_at is overridden).Example: true", required: false
16
+ argument :all_day, Boolean, "the overridden all day flag (present if due_at is overridden).Example: true", required: false
17
17
  argument :all_day_date, LMSGraphQL::Types::DateTimeType, "the overridden all day date (present if due_at is overridden).Example: 2012-07-01", required: false
18
18
  argument :unlock_at, LMSGraphQL::Types::DateTimeType, "the overridden unlock at (present if unlock_at is overridden).Example: 2012-07-01T23:59:00-06:00", required: false
19
19
  argument :lock_at, LMSGraphQL::Types::DateTimeType, "the overridden lock at, if any (present if lock_at is overridden).Example: 2012-07-01T23:59:00-06:00", required: false
@@ -10,7 +10,7 @@ module LMSGraphQL
10
10
  field :course_id, ID, "The ID of the Course the template belongs to..Example: 2", null: true
11
11
  field :last_export_completed_at, LMSGraphQL::Types::DateTimeType, "Time when the last export was completed.Example: 2013-08-28T23:59:00-06:00", null: true
12
12
  field :associated_course_count, Int, "Number of associated courses for the template.Example: 3", null: true
13
- field :latest_migration, String, "Details of the latest migration.", null: true
13
+ field :latest_migration, LMSGraphQL::Types::Canvas::CanvasBlueprintMigration, "Details of the latest migration.", null: true
14
14
 
15
15
  end
16
16
  end
@@ -10,7 +10,7 @@ module LMSGraphQL
10
10
  argument :course_id, ID, "The ID of the Course the template belongs to..Example: 2", required: false
11
11
  argument :last_export_completed_at, LMSGraphQL::Types::DateTimeType, "Time when the last export was completed.Example: 2013-08-28T23:59:00-06:00", required: false
12
12
  argument :associated_course_count, Int, "Number of associated courses for the template.Example: 3", required: false
13
- argument :latest_migration, String, "Details of the latest migration.", required: false
13
+ argument :latest_migration, LMSGraphQL::Types::Canvas::CanvasBlueprintMigrationInput, "Details of the latest migration.", required: false
14
14
 
15
15
  end
16
16
  end