Skip to content
Permalink
Browse files

Add operation name for all GraphQL queries and mutations

...and enable the graphql probe for Skylight.
  • Loading branch information
harigopal committed Mar 13, 2020
1 parent 8b3b78c commit aa87b0de174501aaad5a3a7045be8afee3f592d3
Showing with 62 additions and 59 deletions.
  1. +1 −1 app/javascript/courses/apply/components/CoursesApply__Form.re
  2. +1 −1 app/javascript/courses/curricula/components/CoursesCurriculum__AutoVerify.re
  3. +1 −1 app/javascript/courses/curricula/components/CoursesCurriculum__LevelUpButton.re
  4. +1 −1 app/javascript/courses/curricula/components/CoursesCurriculum__Quiz.re
  5. +1 −1 app/javascript/courses/curricula/components/CoursesCurriculum__SubmissionBuilder.re
  6. +1 −1 app/javascript/courses/curricula/components/CoursesCurriculum__UndoButton.re
  7. +1 −1 app/javascript/courses/review/components/CoursesReview__ChecklistEditor.re
  8. +2 −2 app/javascript/courses/review/components/CoursesReview__GradeCard.re
  9. +1 −1 app/javascript/courses/review/components/CoursesReview__ShowFeedback.re
  10. +1 −1 app/javascript/courses/review/components/CoursesReview__ShowReviewedSubmissions.re
  11. +1 −1 app/javascript/courses/review/components/CoursesReview__SubmissionOverlay.re
  12. +1 −1 app/javascript/courses/students/components/CoursesStudents__CoachNoteShow.re
  13. +1 −1 app/javascript/courses/students/components/CoursesStudents__CoachNotes.re
  14. +1 −1 app/javascript/courses/students/components/CoursesStudents__Root.re
  15. +1 −1 app/javascript/courses/students/components/CoursesStudents__StudentOverlay.re
  16. +1 −1 app/javascript/courses/students/components/CoursesStudents__SubmissionsList.re
  17. +2 −2 app/javascript/questions/editor/QuestionsEditor.re
  18. +1 −1 app/javascript/questions/show/components/QuestionsShow__AddComment.re
  19. +2 −2 app/javascript/questions/show/components/QuestionsShow__AnswerEditor.re
  20. +1 −1 app/javascript/questions/show/components/QuestionsShow__ArchiveManager.re
  21. +2 −2 app/javascript/questions/show/components/QuestionsShow__LikeManager.re
  22. +2 −2 app/javascript/schools/communities/components/SchoolCommunities__Editor.re
  23. +1 −1 app/javascript/schools/courses/components/CourseAuthors__Root.re
  24. +1 −1 app/javascript/schools/courses/components/CourseEditor.re
  25. +1 −1 app/javascript/schools/courses/components/CourseExports__Root.re
  26. +2 −2 app/javascript/schools/courses/components/course_authors/CourseAuthors__Form.re
  27. +2 −2 app/javascript/schools/courses/components/course_editor/CourseEditor__Form.re
  28. +2 −2 app/javascript/schools/courses/components/curriculum_editor/CurriculumEditor__ContentBlockCreator.re
  29. +5 −5 app/javascript/schools/courses/components/curriculum_editor/CurriculumEditor__ContentBlockEditor.re
  30. +2 −2 app/javascript/schools/courses/components/curriculum_editor/CurriculumEditor__TargetDetailsEditor.re
  31. +1 −1 app/javascript/schools/courses/components/curriculum_editor/CurriculumEditor__TargetGroupShow.re
  32. +1 −1 app/javascript/schools/courses/components/curriculum_editor/CurriculumEditor__VersionsEditor.re
  33. +2 −2 ...vascript/schools/courses/components/evaluation_criteria_editor/EvaluationCriterionEditor__Form.re
  34. +1 −1 app/javascript/schools/courses/components/students_editor/StudentsEditor__ActionsForm.re
  35. +1 −1 app/javascript/schools/courses/components/students_editor/StudentsEditor__TeamsList.re
  36. +1 −1 app/javascript/schools/courses/utils/curriculum_editor/CurriculumEditor__SortResourcesMutation.re
  37. +1 −1 app/javascript/schools/settings/components/SchoolAdmins__Editor.re
  38. +2 −2 app/javascript/schools/settings/components/SchoolAdmins__Form.re
  39. +1 −1 app/javascript/schools/settings/components/SchoolCustomize__AgreementsEditor.re
  40. +1 −1 app/javascript/schools/settings/components/SchoolCustomize__ContactsEditor.re
  41. +1 −1 app/javascript/schools/settings/components/SchoolCustomize__DetailsEditor.re
  42. +2 −2 app/javascript/schools/settings/components/SchoolCustomize__LinksEditor.re
  43. +1 −1 app/javascript/shared/types/ContentBlock.re
  44. +3 −0 config/environments/production.rb
@@ -2,7 +2,7 @@ let str = React.string;

module CreateApplicantQuery = [%graphql
{|
mutation($courseId: ID!, $email: String!, $name: String!) {
mutation CreateApplicantMutation($courseId: ID!, $email: String!, $name: String!) {
createApplicant(courseId: $courseId, email: $email, name: $name){
success
}
@@ -5,7 +5,7 @@ module TargetStatus = CoursesCurriculum__TargetStatus;

module AutoVerifySubmissionQuery = [%graphql
{|
mutation($targetId: ID!) {
mutation AutoVerifySubmissionMutation($targetId: ID!) {
autoVerifySubmission(targetId: $targetId){
submission{
id
@@ -4,7 +4,7 @@ let str = React.string;

module LevelUpQuery = [%graphql
{|
mutation($courseId: ID!) {
mutation LevelUpMutation($courseId: ID!) {
levelUp(courseId: $courseId){
success
}
@@ -6,7 +6,7 @@ let str = React.string;

module CreateQuizSubmissionQuery = [%graphql
{|
mutation($targetId: ID!, $answerIds: [ID!]!) {
mutation CreateQuizSubmissionMutation($targetId: ID!, $answerIds: [ID!]!) {
createQuizSubmission(targetId: $targetId, answerIds: $answerIds){
submission{
id
@@ -63,7 +63,7 @@ let isBusy = formState =>

module CreateSubmissionQuery = [%graphql
{|
mutation($targetId: ID!, $checklist: JSON!, $fileIds: [ID!]!) {
mutation CreateSubmissionMutation($targetId: ID!, $checklist: JSON!, $fileIds: [ID!]!) {
createSubmission(targetId: $targetId, checklist: $checklist, fileIds: $fileIds) {
submission {
id
@@ -2,7 +2,7 @@ let str = React.string;

module DeleteSubmissionQuery = [%graphql
{|
mutation($targetId: ID!) {
mutation UndoSubmissionMutation($targetId: ID!) {
undoSubmission(targetId: $targetId) {
success
}
@@ -11,7 +11,7 @@ let str = React.string;

module UpdateReviewChecklistMutation = [%graphql
{|
mutation($targetId: ID!, $reviewChecklist: JSON!) {
mutation UpdateReviewChecklistMutation($targetId: ID!, $reviewChecklist: JSON!) {
updateReviewChecklist(targetId: $targetId, reviewChecklist: $reviewChecklist){
success
}
@@ -54,7 +54,7 @@ let passed = (grades, evaluationCriteria) =>

module CreateGradingMutation = [%graphql
{|
mutation($submissionId: ID!, $feedback: String, $grades: [GradeInput!]!, $note: String, $checklist: JSON!) {
mutation CreateGradingMutation($submissionId: ID!, $feedback: String, $grades: [GradeInput!]!, $note: String, $checklist: JSON!) {
createGrading(submissionId: $submissionId, feedback: $feedback, grades: $grades, note: $note, checklist: $checklist){
success
}
@@ -64,7 +64,7 @@ module CreateGradingMutation = [%graphql

module UndoGradingMutation = [%graphql
{|
mutation($submissionId: ID!) {
mutation UndoGradingMutation($submissionId: ID!) {
undoGrading(submissionId: $submissionId){
success
}
@@ -10,7 +10,7 @@ type state = {

module CreateFeedbackMutation = [%graphql
{|
mutation($submissionId: ID!, $feedback: String!) {
mutation CreateFeedbackMutation($submissionId: ID!, $feedback: String!) {
createFeedback(submissionId: $submissionId, feedback: $feedback){
success
}
@@ -7,7 +7,7 @@ let str = React.string;

module ReviewedSubmissionsQuery = [%graphql
{|
query($courseId: ID!, $levelId: ID, $after: String) {
query ReviewedSubmissionsQuery($courseId: ID!, $levelId: ID, $after: String) {
reviewedSubmissions(courseId: $courseId, levelId: $levelId, first: 20, after: $after) {
nodes {
id,title,userNames,failed,feedbackSent,levelId,createdAt,targetId
@@ -9,7 +9,7 @@ type state =

module SubmissionDetailsQuery = [%graphql
{|
query($submissionId: ID!) {
query SubmissionDetailsQuery($submissionId: ID!) {
submissionDetails(submissionId: $submissionId) {
targetId, targetTitle, levelNumber, levelId, inactiveStudents
students {
@@ -6,7 +6,7 @@ type state = {archiving: bool};

module ArchiveCoachNoteMutation = [%graphql
{|
mutation($id: ID!) {
mutation ArchiveCoachNoteMutation($id: ID!) {
archiveCoachNote(id: $id) {
success
}
@@ -11,7 +11,7 @@ let str = React.string;

module CreateCoachNotesMutation = [%graphql
{|
mutation($studentId: ID!, $note: String!) {
mutation CreateCoachNoteMutation($studentId: ID!, $note: String!) {
createCoachNote(studentId: $studentId, note: $note ) {
coachNote {
id
@@ -22,7 +22,7 @@ type state = {

module TeamsQuery = [%graphql
{|
query($courseId: ID!, $levelId: ID, $search: String, $after: String) {
query TeamsFromCoursesStudentsRootQuery($courseId: ID!, $levelId: ID, $search: String, $after: String) {
teams(courseId: $courseId, levelId: $levelId, search: $search, first: 10, after: $after) {
nodes {
id,
@@ -28,7 +28,7 @@ let closeOverlay = courseId =>

module StudentDetailsQuery = [%graphql
{|
query($studentId: ID!) {
query StudentDetailsQuery($studentId: ID!) {
studentDetails(studentId: $studentId) {
email, phone, socialLinks,
evaluationCriteria {
@@ -11,7 +11,7 @@ let str = React.string;

module StudentSubmissionsQuery = [%graphql
{|
query($studentId: ID!, $after: String) {
query StudentSubmissionsQuery($studentId: ID!, $after: String) {
studentSubmissions(studentId: $studentId, after: $after, first: 20 ) {
nodes {
id
@@ -4,7 +4,7 @@ open QuestionsShow__Types;

module CreateQuestionQuery = [%graphql
{|
mutation($title: String!, $description: String!, $communityId: ID!, $targetId: ID) {
mutation CreateQuestionQuery($title: String!, $description: String!, $communityId: ID!, $targetId: ID) {
createQuestion(description: $description, title: $title, communityId: $communityId, targetId: $targetId) @bsVariant {
questionId
errors
@@ -15,7 +15,7 @@ module CreateQuestionQuery = [%graphql

module UpdateQuestionQuery = [%graphql
{|
mutation($id: ID!, $title: String!, $description: String!) {
mutation UpdateQuestionQuery($id: ID!, $title: String!, $description: String!) {
updateQuestion(id: $id, title: $title, description: $description) @bsVariant {
success
errors
@@ -6,7 +6,7 @@ let str = React.string;

module CreateCommentQuery = [%graphql
{|
mutation($value: String!, $commentableId: ID!, $commentableType: String!) {
mutation CreateCommentMutation($value: String!, $commentableId: ID!, $commentableType: String!) {
createComment(value: $value, commentableId: $commentableId, commentableType: $commentableType) @bsVariant {
commentId
errors
@@ -6,7 +6,7 @@ let str = React.string;

module CreateAnswerQuery = [%graphql
{|
mutation($description: String!, $questionId: ID!) {
mutation CreateAnswerMutation($description: String!, $questionId: ID!) {
createAnswer(description: $description, questionId: $questionId) @bsVariant {
answerId
errors
@@ -17,7 +17,7 @@ module CreateAnswerQuery = [%graphql

module UpdateAnswerQuery = [%graphql
{|
mutation($id: ID!, $description: String!) {
mutation UpdateAnswerMutation($id: ID!, $description: String!) {
updateAnswer(id: $id, description: $description) @bsVariant {
success
errors
@@ -2,7 +2,7 @@ let str = React.string;

module ArchiveQuery = [%graphql
{|
mutation($id: ID!, $resourceType: String!) {
mutation ArchiveCommunityResourceMutation($id: ID!, $resourceType: String!) {
archiveCommunityResource(id: $id, resourceType: $resourceType){
success
}
@@ -4,7 +4,7 @@ let str = React.string;

module CreateAnswerLikeQuery = [%graphql
{|
mutation($answerId: ID!) {
mutation CreateAnswerLikeMutation($answerId: ID!) {
createAnswerLike(answerId: $answerId) @bsVariant {
answerLikeId
errors
@@ -15,7 +15,7 @@ module CreateAnswerLikeQuery = [%graphql

module DestroyAnswerLikeQuery = [%graphql
{|
mutation($id: ID!) {
mutation DestroyAnswerLikeMutation($id: ID!) {
destroyAnswerLike(id: $id) {
success
}
@@ -4,7 +4,7 @@ open SchoolCommunities__IndexTypes;

module CreateCommunityQuery = [%graphql
{|
mutation($name: String!, $targetLinkable: Boolean!, $courseIds: [ID!]!) {
mutation CreateCommunityMutation($name: String!, $targetLinkable: Boolean!, $courseIds: [ID!]!) {
createCommunity(name: $name, targetLinkable: $targetLinkable, courseIds: $courseIds) @bsVariant {
communityId
errors
@@ -15,7 +15,7 @@ module CreateCommunityQuery = [%graphql

module UpdateCommunityQuery = [%graphql
{|
mutation($id: ID!, $name: String!, $targetLinkable: Boolean!, $courseIds: [ID!]!) {
mutation UpdateCommunityMutation($id: ID!, $name: String!, $targetLinkable: Boolean!, $courseIds: [ID!]!) {
updateCommunity(id: $id, name: $name, targetLinkable: $targetLinkable, courseIds: $courseIds) @bsVariant {
communityId
errors
@@ -40,7 +40,7 @@ let reducer = (state, action) =>

module DeleteCourseAuthorQuery = [%graphql
{|
mutation($id: ID!) {
mutation DeleteCourseAuthorMutation($id: ID!) {
deleteCourseAuthor(id: $id) {
success
}
@@ -6,7 +6,7 @@ let str = React.string;

module CoursesQuery = [%graphql
{|
query {
query CoursesQuery {
courses{
id
name
@@ -42,7 +42,7 @@ let updateTagSelection = (setState, key, _value, selected) =>

module CreateCourseExportQuery = [%graphql
{|
mutation($courseId: ID!, $tagIds: [ID!]!, $reviewedOnly: Boolean!) {
mutation CreateCourseExportMutation ($courseId: ID!, $tagIds: [ID!]!, $reviewedOnly: Boolean!) {
createCourseExport(courseId: $courseId, tagIds: $tagIds, reviewedOnly: $reviewedOnly){
courseExport {
id
@@ -4,7 +4,7 @@ open CourseAuthors__Types;

module CreateCourseAuthorQuery = [%graphql
{|
mutation($courseId: ID!, $name: String!, $email: String!) {
mutation CreateCourseAuthorMutation($courseId: ID!, $name: String!, $email: String!) {
createCourseAuthor(courseId: $courseId, name: $name, email: $email){
courseAuthor{
id,
@@ -17,7 +17,7 @@ module CreateCourseAuthorQuery = [%graphql

module UpdateCourseAuthorQuery = [%graphql
{|
mutation($id: ID!, $name: String!) {
mutation UpdateCourseAuthorMutation($id: ID!, $name: String!) {
updateCourseAuthor(id: $id, name: $name) {
success
}
@@ -49,7 +49,7 @@ let reducer = (state, action) => {

module CreateCourseQuery = [%graphql
{|
mutation($name: String!, $description: String!, $endsAt: Date, $about: String!,$publicSignup: Boolean!,$featured: Boolean!) {
mutation CreateCourseMutation($name: String!, $description: String!, $endsAt: Date, $about: String!,$publicSignup: Boolean!,$featured: Boolean!) {
createCourse(name: $name, description: $description, endsAt: $endsAt, about: $about,publicSignup: $publicSignup,featured: $featured) {
course {
id
@@ -61,7 +61,7 @@ module CreateCourseQuery = [%graphql

module UpdateCourseQuery = [%graphql
{|
mutation($id: ID!, $description: String!, $name: String!, $endsAt: Date, $about: String!, $publicSignup: Boolean!, $featured: Boolean!) {
mutation UpdateCourseMutation($id: ID!, $description: String!, $name: String!, $endsAt: Date, $about: String!, $publicSignup: Boolean!, $featured: Boolean!) {
updateCourse(id: $id, name: $name, description: $description, endsAt: $endsAt, about: $about, publicSignup: $publicSignup, featured: $featured){
course {
id
@@ -8,7 +8,7 @@ let str = React.string;

module CreateMarkdownContentBlock = [%graphql
{|
mutation($targetId: ID!, $aboveContentBlockId: ID) {
mutation CreateMarkdownContentBlockMutation($targetId: ID!, $aboveContentBlockId: ID) {
createMarkdownContentBlock(targetId: $targetId, aboveContentBlockId: $aboveContentBlockId) {
contentBlock {
...ContentBlock.Fragments.AllFields
@@ -20,7 +20,7 @@ module CreateMarkdownContentBlock = [%graphql

module CreateEmbedContentBlock = [%graphql
{|
mutation($targetId: ID!, $aboveContentBlockId: ID, $url: String!) {
mutation CreateEmbedContentBlockMutation($targetId: ID!, $aboveContentBlockId: ID, $url: String!) {
createEmbedContentBlock(targetId: $targetId, aboveContentBlockId: $aboveContentBlockId, url: $url) {
contentBlock {
...ContentBlock.Fragments.AllFields
@@ -34,7 +34,7 @@ let reducer = (state, action) =>

module DeleteContentBlockMutation = [%graphql
{|
mutation($id: ID!) {
mutation DeleteContentBlockMutation($id: ID!) {
deleteContentBlock(id: $id) {
success
}
@@ -44,7 +44,7 @@ module DeleteContentBlockMutation = [%graphql

module MoveContentBlockMutation = [%graphql
{|
mutation($id: ID!, $direction: MoveDirection!) {
mutation MoveContentBlockMutation($id: ID!, $direction: MoveDirection!) {
moveContentBlock(id: $id, direction: $direction) {
success
}
@@ -54,7 +54,7 @@ module MoveContentBlockMutation = [%graphql

module UpdateFileBlockMutation = [%graphql
{|
mutation($id: ID!, $title: String!) {
mutation UpdateFileBlockMutation($id: ID!, $title: String!) {
updateFileBlock(id: $id, title: $title) {
contentBlock {
...ContentBlock.Fragments.AllFields
@@ -66,7 +66,7 @@ module UpdateFileBlockMutation = [%graphql

module UpdateMarkdownBlockMutation = [%graphql
{|
mutation($id: ID!, $markdown: String!) {
mutation UpdateMarkdownBlockMutation($id: ID!, $markdown: String!) {
updateMarkdownBlock(id: $id, markdown: $markdown) {
contentBlock {
...ContentBlock.Fragments.AllFields
@@ -78,7 +78,7 @@ module UpdateMarkdownBlockMutation = [%graphql

module UpdateImageBlockMutation = [%graphql
{|
mutation($id: ID!, $caption: String!) {
mutation UpdateImageBlockMutation($id: ID!, $caption: String!) {
updateImageBlock(id: $id, caption: $caption) {
contentBlock {
...ContentBlock.Fragments.AllFields
@@ -65,7 +65,7 @@ type action =

module TargetDetailsQuery = [%graphql
{|
query($targetId: ID!) {
query TargetDetailsQuery($targetId: ID!) {
targetDetails(targetId: $targetId) {
title
targetGroupId
@@ -654,7 +654,7 @@ let saveDisabled = state => {

module UpdateTargetQuery = [%graphql
{|
mutation($id: ID!, $targetGroupId: ID!, $title: String!, $role: String!, $evaluationCriteria: [ID!]!,$prerequisiteTargets: [ID!]!, $quiz: [TargetQuizInput!]!, $completionInstructions: String, $linkToComplete: String, $visibility: String!, $checklist: JSON! ) {
mutation UpdateTargetMutation($id: ID!, $targetGroupId: ID!, $title: String!, $role: String!, $evaluationCriteria: [ID!]!,$prerequisiteTargets: [ID!]!, $quiz: [TargetQuizInput!]!, $completionInstructions: String, $linkToComplete: String, $visibility: String!, $checklist: JSON! ) {
updateTarget(id: $id, targetGroupId: $targetGroupId, title: $title, role: $role, evaluationCriteria: $evaluationCriteria,prerequisiteTargets: $prerequisiteTargets, quiz: $quiz, completionInstructions: $completionInstructions, linkToComplete: $linkToComplete, visibility: $visibility, checklist: $checklist ) {
success
}
@@ -10,7 +10,7 @@ type state = {

module CreateTargetMutation = [%graphql
{|
mutation($title: String!, $targetGroupId: String!) {
mutation CreateTargetMutation($title: String!, $targetGroupId: String!) {
createTarget(title: $title, targetGroupId: $targetGroupId ) {
target {
id

0 comments on commit aa87b0d

Please sign in to comment.
You can’t perform that action at this time.