summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/sidebar/constants.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/sidebar/constants.js')
-rw-r--r--app/assets/javascripts/sidebar/constants.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/app/assets/javascripts/sidebar/constants.js b/app/assets/javascripts/sidebar/constants.js
index 274aa237aea..a0e636488f4 100644
--- a/app/assets/javascripts/sidebar/constants.js
+++ b/app/assets/javascripts/sidebar/constants.js
@@ -1,9 +1,17 @@
import { IssuableType } from '~/issue_show/constants';
+import epicConfidentialQuery from '~/sidebar/queries/epic_confidential.query.graphql';
+import issueConfidentialQuery from '~/sidebar/queries/issue_confidential.query.graphql';
+import issueReferenceQuery from '~/sidebar/queries/issue_reference.query.graphql';
+import mergeRequestReferenceQuery from '~/sidebar/queries/merge_request_reference.query.graphql';
+import updateEpicMutation from '~/sidebar/queries/update_epic_confidential.mutation.graphql';
+import updateIssueConfidentialMutation from '~/sidebar/queries/update_issue_confidential.mutation.graphql';
import getIssueParticipants from '~/vue_shared/components/sidebar/queries/get_issue_participants.query.graphql';
import getMergeRequestParticipants from '~/vue_shared/components/sidebar/queries/get_mr_participants.query.graphql';
import updateAssigneesMutation from '~/vue_shared/components/sidebar/queries/update_issue_assignees.mutation.graphql';
import updateMergeRequestParticipantsMutation from '~/vue_shared/components/sidebar/queries/update_mr_assignees.mutation.graphql';
+export const ASSIGNEES_DEBOUNCE_DELAY = 250;
+
export const assigneesQueries = {
[IssuableType.Issue]: {
query: getIssueParticipants,
@@ -14,3 +22,23 @@ export const assigneesQueries = {
mutation: updateMergeRequestParticipantsMutation,
},
};
+
+export const confidentialityQueries = {
+ [IssuableType.Issue]: {
+ query: issueConfidentialQuery,
+ mutation: updateIssueConfidentialMutation,
+ },
+ [IssuableType.Epic]: {
+ query: epicConfidentialQuery,
+ mutation: updateEpicMutation,
+ },
+};
+
+export const referenceQueries = {
+ [IssuableType.Issue]: {
+ query: issueReferenceQuery,
+ },
+ [IssuableType.MergeRequest]: {
+ query: mergeRequestReferenceQuery,
+ },
+};